public class EmbeddedLdapRuleImpl extends Object implements EmbeddedLdapRule
| Modifier and Type | Method and Description |
|---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description) |
Context |
context()
For tests depending on the standard Java JNDI API
|
static EmbeddedLdapRule |
createForConfiguration(com.unboundid.ldap.listener.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.
|
com.unboundid.ldap.sdk.LDAPInterface |
ldapConnection()
For tests depending on the UnboundID LDAP SDK.
|
com.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(com.unboundid.ldap.listener.InMemoryDirectoryServerConfig inMemoryDirectoryServerConfig, AuthenticationConfiguration authenticationConfiguration, List<String> ldifs)
public com.unboundid.ldap.sdk.LDAPInterface ldapConnection()
throws com.unboundid.ldap.sdk.LDAPException
EmbeddedLdapRuleldapConnection in interface EmbeddedLdapRulecom.unboundid.ldap.sdk.LDAPException - if a connection can not be openedpublic com.unboundid.ldap.sdk.LDAPConnection unsharedLdapConnection()
throws com.unboundid.ldap.sdk.LDAPException
EmbeddedLdapRuleunsharedLdapConnection in interface EmbeddedLdapRulecom.unboundid.ldap.sdk.LDAPException - 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 org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description)
apply in interface org.junit.rules.TestRuleCopyright © 2015–2018 Sondre Eikanger Kvalø. All rights reserved..