org.zapodot.junit.ldap.EmbeddedLdapRuleBuilder Java Examples
The following examples show how to use
org.zapodot.junit.ldap.EmbeddedLdapRuleBuilder.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FlattenNestedGroupsTest.java From Openfire with Apache License 2.0 | 6 votes |
private void initLdapManager(boolean posix, boolean flattenNestedGroups) { final Map<String, String> properties = new HashMap<>(); properties.put("ldap.host", "localhost"); properties.put("ldap.port", "" + LDAP_SERVER_PORT); properties.put("ldap.sslEnabled", "false" ); properties.put("ldap.startTlsEnabled", "false" ); properties.put("ldap.baseDN", "dc=mobikat,dc=net"); properties.put("ldap.adminDN", EmbeddedLdapRuleBuilder.DEFAULT_BIND_DSN); properties.put("ldap.adminPassword", EmbeddedLdapRuleBuilder.DEFAULT_BIND_CREDENTIALS); properties.put("ldap.usernameField", "uid"); properties.put("ldap.nameField", "cn"); properties.put("ldap.searchFilter", "(objectClass=inetOrgPerson)"); properties.put("ldap.groupNameField", "cn"); properties.put("ldap.groupMemberField", posix ? "memberUid" : "uniqueMember"); properties.put("ldap.groupSearchFilter", posix ? "(objectClass=posixGroup)" : "(objectClass=groupOfUniqueNames)"); if (posix) properties.put("ldap.posixMode", "true"); if (flattenNestedGroups) properties.put("ldap.flattenNestedGroups", "true"); LdapManager.setInstance(new LdapManager(properties)); UserManager.setProvider(new LdapUserProvider()); UserManager.getInstance().clearCaches(); }
Example #2
Source File: EmbeddedLdapRuleTest.java From submarine with Apache License 2.0 | 4 votes |
@Test(expected = IllegalStateException.class) public void testNoPortAssignedYet() throws Exception { final EmbeddedLdapRule embeddedLdapRule = new EmbeddedLdapRuleBuilder().build(); embeddedLdapRule.embeddedServerPort(); }
Example #3
Source File: UnboundidProviderTest.java From sakai with Educational Community License v2.0 | 4 votes |
@Test(expected = IllegalStateException.class) public void testNoPortAssignedYet() throws Exception { final EmbeddedLdapRule embeddedLdapRule = new EmbeddedLdapRuleBuilder().build(); embeddedLdapRule.embeddedServerPort(); }
Example #4
Source File: UnboundidProviderTest.java From sakai with Educational Community License v2.0 | 4 votes |
@Test(expected = IllegalStateException.class) public void testNoPortAssignedYet() throws Exception { final EmbeddedLdapRule embeddedLdapRule = new EmbeddedLdapRuleBuilder().build(); embeddedLdapRule.embeddedServerPort(); }