From 2ef6ad0ed026c6e10609e407da66e2c4b9e733b1 Mon Sep 17 00:00:00 2001 From: Josh Cummings Date: Tue, 9 May 2023 17:43:05 -0600 Subject: [PATCH] Address JavaFormat Violations in Test Support Tests Issue gh-743 --- .../ldap/test/EmbeddedLdapServerFactoryBeanTests.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test-support/src/test/java/org/springframework/ldap/test/EmbeddedLdapServerFactoryBeanTests.java b/test-support/src/test/java/org/springframework/ldap/test/EmbeddedLdapServerFactoryBeanTests.java index 3d6b921b..b83469c4 100644 --- a/test-support/src/test/java/org/springframework/ldap/test/EmbeddedLdapServerFactoryBeanTests.java +++ b/test-support/src/test/java/org/springframework/ldap/test/EmbeddedLdapServerFactoryBeanTests.java @@ -28,8 +28,7 @@ import org.springframework.ldap.core.AttributesMapper; import org.springframework.ldap.core.LdapTemplate; import org.springframework.ldap.query.LdapQueryBuilder; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; +import static org.assertj.core.api.Assertions.assertThat; public class EmbeddedLdapServerFactoryBeanTests { @@ -37,7 +36,7 @@ public class EmbeddedLdapServerFactoryBeanTests { public void testServerStartup() throws Exception { ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("/applicationContext.xml"); LdapTemplate ldapTemplate = ctx.getBean(LdapTemplate.class); - assertNotNull(ldapTemplate); + assertThat(ldapTemplate).isNotNull(); List list = ldapTemplate.search(LdapQueryBuilder.query().where("objectclass").is("person"), new AttributesMapper() { @@ -45,7 +44,7 @@ public class EmbeddedLdapServerFactoryBeanTests { return (String) attrs.get("cn").get(); } }); - assertEquals(5, list.size()); + assertThat(5).isEqualTo(list.size()); } }