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(); }
public void testBase64Value() { LdifData ldd = new LdifData("description", "SGVsbG8Kd29ybGQ=", true); assertEquals("Hello\nworld", ldd.getValue()); }
public void testComplexValue() throws IOException { LdifData ldd = new LdifData("cn", "Dietrich\nPfeifle"); assertEquals("Dietrich\nPfeifle", ldd.getValue()); assertEquals("cn:: RGlldHJpY2gKUGZlaWZsZQ==", encodeToString(ldd)); }
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()); }