Skip to content

Commit 2ef6ad0

Browse files
committed
Address JavaFormat Violations in Test Support Tests
Issue gh-743
1 parent c669d4c commit 2ef6ad0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test-support/src/test/java/org/springframework/ldap/test/EmbeddedLdapServerFactoryBeanTests.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,23 @@
2828
import org.springframework.ldap.core.LdapTemplate;
2929
import org.springframework.ldap.query.LdapQueryBuilder;
3030

31-
import static org.junit.Assert.assertEquals;
32-
import static org.junit.Assert.assertNotNull;
31+
import static org.assertj.core.api.Assertions.assertThat;
3332

3433
public class EmbeddedLdapServerFactoryBeanTests {
3534

3635
@Test
3736
public void testServerStartup() throws Exception {
3837
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("/applicationContext.xml");
3938
LdapTemplate ldapTemplate = ctx.getBean(LdapTemplate.class);
40-
assertNotNull(ldapTemplate);
39+
assertThat(ldapTemplate).isNotNull();
4140

4241
List<String> list = ldapTemplate.search(LdapQueryBuilder.query().where("objectclass").is("person"),
4342
new AttributesMapper<String>() {
4443
public String mapFromAttributes(Attributes attrs) throws NamingException {
4544
return (String) attrs.get("cn").get();
4645
}
4746
});
48-
assertEquals(5, list.size());
47+
assertThat(5).isEqualTo(list.size());
4948
}
5049

5150
}

0 commit comments

Comments
 (0)