Search in sources :

Example 21 with ServerInstance

use of com.iplanet.services.ldap.ServerInstance in project OpenAM by OpenRock.

the class ServerGroupConfigurationTest method shouldReturnBindDNFromInstance.

@Test
public void shouldReturnBindDNFromInstance() {
    // Given
    ServerInstance mockInstance = mock(ServerInstance.class);
    ServerGroup mockGroup = mock(ServerGroup.class);
    ServerGroupConfiguration config = new ServerGroupConfiguration(mockGroup, mockInstance);
    // When
    config.getBindDN();
    // Then
    verify(mockInstance).getAuthID();
}
Also used : ServerGroup(com.iplanet.services.ldap.ServerGroup) ServerInstance(com.iplanet.services.ldap.ServerInstance) Test(org.testng.annotations.Test)

Example 22 with ServerInstance

use of com.iplanet.services.ldap.ServerInstance in project OpenAM by OpenRock.

the class ServerGroupConfigurationTest method shouldReturnMaxConnectionsFromInstance.

@Test
public void shouldReturnMaxConnectionsFromInstance() {
    // Given
    ServerInstance mockInstance = mock(ServerInstance.class);
    ServerGroup mockGroup = mock(ServerGroup.class);
    ServerGroupConfiguration config = new ServerGroupConfiguration(mockGroup, mockInstance);
    // When
    config.getMaxConnections();
    // Then
    verify(mockInstance).getMaxConnections();
}
Also used : ServerGroup(com.iplanet.services.ldap.ServerGroup) ServerInstance(com.iplanet.services.ldap.ServerInstance) Test(org.testng.annotations.Test)

Aggregations

ServerInstance (com.iplanet.services.ldap.ServerInstance)22 DSConfigMgr (com.iplanet.services.ldap.DSConfigMgr)13 ServerGroup (com.iplanet.services.ldap.ServerGroup)11 Test (org.testng.annotations.Test)8 LDAPServiceException (com.iplanet.services.ldap.LDAPServiceException)7 Server (com.iplanet.services.ldap.Server)4 IdRepoException (com.sun.identity.idm.IdRepoException)3 ServerConfigurationFactory (org.forgerock.openam.sm.ServerConfigurationFactory)3 LdapException (org.forgerock.opendj.ldap.LdapException)3 IOException (java.io.IOException)2 Collection (java.util.Collection)2 Iterator (java.util.Iterator)2 LoginException (javax.security.auth.login.LoginException)2 LDAPURL (org.forgerock.openam.ldap.LDAPURL)2 ConnectionFactory (org.forgerock.opendj.ldap.ConnectionFactory)2 ShutdownListener (org.forgerock.util.thread.listener.ShutdownListener)2 ShutdownManager (org.forgerock.util.thread.listener.ShutdownManager)2 Matchers.anyString (org.mockito.Matchers.anyString)2 EventException (com.iplanet.services.ldap.event.EventException)1 SSOToken (com.iplanet.sso.SSOToken)1