public class EmbeddedLdapRuleImpl extends Object implements EmbeddedLdapRule
| Modifier and Type | Method and Description |
|---|---|
Statement |
apply(Statement base,
Description description) |
Context |
context()
For tests depending on the standard Java JNDI API
|
static EmbeddedLdapRule |
createForConfiguration(InMemoryDirectoryServerConfig inMemoryDirectoryServerConfig,
AuthenticationConfiguration authenticationConfiguration,
List<String> ldifs) |
DirContext |
dirContext()
Like
EmbeddedLdapRule.context(), but returns a DirContext |
int |
embeddedServerPort()
Gives access to the listening port for the currently running embedded LDAP server.
|
LDAPInterface |
ldapConnection()
For tests depending on the UnboundID LDAP SDK.
|
LDAPConnection |
unsharedLdapConnection()
For tests depending on the UnboundID LDAP SDK that needs access to an ${link LDAPConnection} object
rather than the interface.
|
public static EmbeddedLdapRule createForConfiguration(InMemoryDirectoryServerConfig inMemoryDirectoryServerConfig, AuthenticationConfiguration authenticationConfiguration, List<String> ldifs)
public LDAPInterface ldapConnection() throws LDAPException
EmbeddedLdapRuleldapConnection in interface EmbeddedLdapRuleLDAPException - if a connection can not be openedpublic LDAPConnection unsharedLdapConnection() throws LDAPException
EmbeddedLdapRuleunsharedLdapConnection in interface EmbeddedLdapRuleLDAPException - if an exception occurred while establishing the connectionpublic Context context() throws NamingException
EmbeddedLdapRulecontext in interface EmbeddedLdapRuleNamingException - if context can not be createdpublic DirContext dirContext() throws NamingException
EmbeddedLdapRuleEmbeddedLdapRule.context(), but returns a DirContextdirContext in interface EmbeddedLdapRuleNamingException - if a LDAP failure happens during DirContext creationpublic int embeddedServerPort()
EmbeddedLdapRuleNote: the embedded LDAP server is by default configured to listen only on the loopback address (i.e localhost/127.0.0.1) unless another address has been provided to the builder when the rule was built
embeddedServerPort in interface EmbeddedLdapRuleEmbeddedLdapRuleBuilder.bindingToAddress(String)public Statement apply(Statement base, Description description)
Copyright © 2015 Sondre Eikanger Kvalø. All rights reserved..