Fix checkstyle violations

This commit is contained in:
Stephane Nicoll 2020-03-04 15:04:47 +01:00
parent e1771face7
commit 89805fdb61
1 changed files with 3 additions and 3 deletions

View File

@ -153,7 +153,7 @@ class EmbeddedLdapAutoConfigurationTests {
void ldapContextSourceWithCredentialsIsCreated() {
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")
.run(context -> {
.run((context) -> {
LdapContextSource ldapContextSource = context.getBean(LdapContextSource.class);
assertThat(ldapContextSource.getUrls()).isNotEmpty();
assertThat(ldapContextSource.getUserDn()).isEqualTo("uid=root");
@ -162,7 +162,7 @@ class EmbeddedLdapAutoConfigurationTests {
@Test
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);
assertThat(ldapContextSource.getUrls()).isNotEmpty();
assertThat(ldapContextSource.getUserDn()).isEmpty();
@ -172,7 +172,7 @@ class EmbeddedLdapAutoConfigurationTests {
@Test
void ldapContextWithoutSpringLdapIsNotCreated() {
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).doesNotHaveBean(LdapContextSource.class);
});