Commit 89805fdb authored by Stephane Nicoll's avatar Stephane Nicoll

Fix checkstyle violations

parent e1771fac
...@@ -153,7 +153,7 @@ class EmbeddedLdapAutoConfigurationTests { ...@@ -153,7 +153,7 @@ class EmbeddedLdapAutoConfigurationTests {
void ldapContextSourceWithCredentialsIsCreated() { void ldapContextSourceWithCredentialsIsCreated() {
this.contextRunner.withPropertyValues("spring.ldap.embedded.base-dn:dc=spring,dc=org", this.contextRunner.withPropertyValues("spring.ldap.embedded.base-dn:dc=spring,dc=org",
"spring.ldap.embedded.credential.username:uid=root", "spring.ldap.embedded.credential.password:boot") "spring.ldap.embedded.credential.username:uid=root", "spring.ldap.embedded.credential.password:boot")
.run(context -> { .run((context) -> {
LdapContextSource ldapContextSource = context.getBean(LdapContextSource.class); LdapContextSource ldapContextSource = context.getBean(LdapContextSource.class);
assertThat(ldapContextSource.getUrls()).isNotEmpty(); assertThat(ldapContextSource.getUrls()).isNotEmpty();
assertThat(ldapContextSource.getUserDn()).isEqualTo("uid=root"); assertThat(ldapContextSource.getUserDn()).isEqualTo("uid=root");
...@@ -162,7 +162,7 @@ class EmbeddedLdapAutoConfigurationTests { ...@@ -162,7 +162,7 @@ class EmbeddedLdapAutoConfigurationTests {
@Test @Test
void ldapContextSourceWithoutCredentialsIsCreated() { void ldapContextSourceWithoutCredentialsIsCreated() {
this.contextRunner.withPropertyValues("spring.ldap.embedded.base-dn:dc=spring,dc=org").run(context -> { this.contextRunner.withPropertyValues("spring.ldap.embedded.base-dn:dc=spring,dc=org").run((context) -> {
LdapContextSource ldapContextSource = context.getBean(LdapContextSource.class); LdapContextSource ldapContextSource = context.getBean(LdapContextSource.class);
assertThat(ldapContextSource.getUrls()).isNotEmpty(); assertThat(ldapContextSource.getUrls()).isNotEmpty();
assertThat(ldapContextSource.getUserDn()).isEmpty(); assertThat(ldapContextSource.getUserDn()).isEmpty();
...@@ -172,7 +172,7 @@ class EmbeddedLdapAutoConfigurationTests { ...@@ -172,7 +172,7 @@ class EmbeddedLdapAutoConfigurationTests {
@Test @Test
void ldapContextWithoutSpringLdapIsNotCreated() { void ldapContextWithoutSpringLdapIsNotCreated() {
this.contextRunner.withPropertyValues("spring.ldap.embedded.base-dn:dc=spring,dc=org") this.contextRunner.withPropertyValues("spring.ldap.embedded.base-dn:dc=spring,dc=org")
.withClassLoader(new FilteredClassLoader(ContextSource.class)).run(context -> { .withClassLoader(new FilteredClassLoader(ContextSource.class)).run((context) -> {
assertThat(context).hasNotFailed(); assertThat(context).hasNotFailed();
assertThat(context).doesNotHaveBean(LdapContextSource.class); assertThat(context).doesNotHaveBean(LdapContextSource.class);
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment