org.zapodot.junit.ldap.EmbeddedLdapRule Java Examples

The following examples show how to use org.zapodot.junit.ldap.EmbeddedLdapRule. 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: EmbeddedLdapRuleImpl.java    From embedded-ldap-junit with MIT License 5 votes vote down vote up
public static EmbeddedLdapRule createForConfiguration(final InMemoryDirectoryServerConfig inMemoryDirectoryServerConfig,
                                                      final AuthenticationConfiguration authenticationConfiguration,
                                                      final List<String> ldifs) {
    try {
        return new EmbeddedLdapRuleImpl(createServer(inMemoryDirectoryServerConfig, ldifs),
                                        authenticationConfiguration);
    } catch (LDAPException e) {
        throw new IllegalStateException("Can not initiate in-memory LDAP server due to an exception", e);
    }
}
 
Example #2
Source File: EmbeddedLdapRuleTest.java    From submarine with Apache License 2.0 4 votes vote down vote up
@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 vote down vote up
@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 vote down vote up
@Test(expected = IllegalStateException.class)
public void testNoPortAssignedYet() throws Exception {
    final EmbeddedLdapRule embeddedLdapRule = new EmbeddedLdapRuleBuilder().build();
    embeddedLdapRule.embeddedServerPort();

}