X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.security.core%2Fext%2Ftest%2Forg%2Fargeo%2Fosgi%2Fuseradmin%2FLdifParserTest.java;h=34ac98b1cb0e8f069945fd85d2233251aea5005f;hb=4f0362bc7817d05a7c3e2c8a33c7e9eb62989257;hp=75a5c34b3442c4d39129b4c343349dcc2ead8ccc;hpb=e96c7f26228b70f604e41b7a56ce6c5836da9e12;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 75a5c34b3..34ac98b1c 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 @@ -22,19 +22,20 @@ public class LdifParserTest extends TestCase implements BasicTestConstants { LdapName rootDn = new LdapName(ROOT_USER_DN); Attributes rootAttributes = res.get(rootDn); assertNotNull(rootAttributes); - assertEquals("Superuser", rootAttributes.get("description").get()); - byte[] rawPwEntry = (byte[]) rootAttributes.get("userpassword").get(); + assertEquals("Superuser", + rootAttributes.get(LdifName.description.name()).get()); + byte[] rawPwEntry = (byte[]) rootAttributes.get( + LdifName.userPassword.name()).get(); assertEquals("{SHA}ieSV55Qc+eQOaYDRSha/AjzNTJE=", new String(rawPwEntry)); byte[] hashedPassword = DigestUtils.sha1("demo".getBytes()); assertEquals("{SHA}" + Base64.encodeBase64String(hashedPassword), new String(rawPwEntry)); - LdapName adminDn = new LdapName( - ADMIN_GROUP_DN); + LdapName adminDn = new LdapName(ADMIN_GROUP_DN); Attributes adminAttributes = res.get(adminDn); assertNotNull(adminAttributes); - Attribute memberAttribute = adminAttributes.get("member"); + Attribute memberAttribute = adminAttributes.get(LdifName.member.name()); assertNotNull(memberAttribute); NamingEnumeration members = memberAttribute.getAll(); List users = new ArrayList();