Search in sources :

Example 11 with LdapTemplate

use of org.springframework.ldap.core.LdapTemplate in project spring-boot by spring-projects.

the class LdapHealthIndicatorTests method indicatorExists.

@Test
public void indicatorExists() {
    this.context.register(LdapAutoConfiguration.class, LdapDataAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class, EndpointAutoConfiguration.class, HealthIndicatorAutoConfiguration.class);
    this.context.refresh();
    LdapTemplate ldapTemplate = this.context.getBean(LdapTemplate.class);
    assertThat(ldapTemplate).isNotNull();
    LdapHealthIndicator healthIndicator = this.context.getBean(LdapHealthIndicator.class);
    assertThat(healthIndicator).isNotNull();
}
Also used : LdapTemplate(org.springframework.ldap.core.LdapTemplate) Test(org.junit.Test)

Aggregations

LdapTemplate (org.springframework.ldap.core.LdapTemplate)11 Test (org.junit.Test)8 Before (org.junit.Before)3 InMemoryXmlApplicationContext (org.springframework.security.config.util.InMemoryXmlApplicationContext)3 DefaultSpringSecurityContextSource (org.springframework.security.ldap.DefaultSpringSecurityContextSource)3 SecurityConfig (com.thoughtworks.go.config.SecurityConfig)1 GoConfigService (com.thoughtworks.go.server.service.GoConfigService)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 BiFunction (java.util.function.BiFunction)1 BasicAttribute (javax.naming.directory.BasicAttribute)1 BasicAttributes (javax.naming.directory.BasicAttributes)1 DirContext (javax.naming.directory.DirContext)1 ModificationItem (javax.naming.directory.ModificationItem)1 SearchControls (javax.naming.directory.SearchControls)1 CamelContext (org.apache.camel.CamelContext)1 Endpoint (org.apache.camel.Endpoint)1 Exchange (org.apache.camel.Exchange)1 Message (org.apache.camel.Message)1 DefaultExchange (org.apache.camel.impl.DefaultExchange)1