X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.security.core%2Fext%2Ftest%2Forg%2Fargeo%2Fosgi%2Fuseradmin%2FLdifParserTest.java;h=75a5c34b3442c4d39129b4c343349dcc2ead8ccc;hb=a9703e4b430af19ae04c9982d2393bf1b7504006;hp=6a579668a6db4fcdb7d8d06c0a7a2c6840012fda;hpb=526ad82ec71f69802d53a68326b4892a8dc84db9;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.security.core/ext/test/org/argeo/osgi/useradmin/LdifParserTest.java b/org.argeo.security.core/ext/test/org/argeo/osgi/useradmin/LdifParserTest.java index 6a579668a..75a5c34b3 100644 --- a/org.argeo.security.core/ext/test/org/argeo/osgi/useradmin/LdifParserTest.java +++ b/org.argeo.security.core/ext/test/org/argeo/osgi/useradmin/LdifParserTest.java @@ -14,13 +14,12 @@ import junit.framework.TestCase; import org.apache.commons.codec.binary.Base64; import org.apache.commons.codec.digest.DigestUtils; -public class LdifParserTest extends TestCase { - public void testSimpleLdif() throws Exception { +public class LdifParserTest extends TestCase implements BasicTestConstants { + public void testBasicLdif() throws Exception { LdifParser ldifParser = new LdifParser(); SortedMap res = ldifParser.read(getClass() - .getResourceAsStream("test.ldif")); - LdapName rootDn = new LdapName( - "uid=root,ou=People,dc=demo,dc=example,dc=org"); + .getResourceAsStream("basic.ldif")); + LdapName rootDn = new LdapName(ROOT_USER_DN); Attributes rootAttributes = res.get(rootDn); assertNotNull(rootAttributes); assertEquals("Superuser", rootAttributes.get("description").get()); @@ -32,7 +31,7 @@ public class LdifParserTest extends TestCase { new String(rawPwEntry)); LdapName adminDn = new LdapName( - "cn=admin,ou=Roles,dc=demo,dc=example,dc=org"); + ADMIN_GROUP_DN); Attributes adminAttributes = res.get(adminDn); assertNotNull(adminAttributes); Attribute memberAttribute = adminAttributes.get("member");