Exemplo n.º 1
0
  public void testFoo() throws IOException {
    PushBackLineReader in =
        new PushBackLineReader(new BufferedReader(new FileReader("tests/example1.ldif")), false);

    LdifData data = null;
    while ((data = Decoder.pullLdifData(in)) != null) data.dump();
  }
Exemplo n.º 2
0
 public void testBase64Value() {
   LdifData ldd = new LdifData("description", "SGVsbG8Kd29ybGQ=", true);
   assertEquals("Hello\nworld", ldd.getValue());
 }
Exemplo n.º 3
0
 public void testComplexValue() throws IOException {
   LdifData ldd = new LdifData("cn", "Dietrich\nPfeifle");
   assertEquals("Dietrich\nPfeifle", ldd.getValue());
   assertEquals("cn:: RGlldHJpY2gKUGZlaWZsZQ==", encodeToString(ldd));
 }
Exemplo n.º 4
0
 public void testConstructorAndGetters() {
   LdifData ldd = new LdifData("dn", "dc=structure-net, dc=de");
   assertEquals("dn", ldd.getName());
   assertEquals("dc=structure-net, dc=de", ldd.getValue());
 }