Esempio 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();
  }
Esempio n. 2
0
 public void testBase64Value() {
   LdifData ldd = new LdifData("description", "SGVsbG8Kd29ybGQ=", true);
   assertEquals("Hello\nworld", ldd.getValue());
 }
Esempio 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));
 }
Esempio 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());
 }