Skip to content

Commit 987404f

Browse files
committed
polish assertj assertions
Issue #1058 Signed-off-by: etrandafir93 <[email protected]>
1 parent eb472b7 commit 987404f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void serverStartup() throws Exception {
3939

4040
List<String> list = ldapTemplate.search(LdapQueryBuilder.query().where("objectclass").is("person"),
4141
this::mapFromAttributes);
42-
assertThat(5).isEqualTo(list.size());
42+
assertThat(list).hasSize(5);
4343
}
4444

4545
private String mapFromAttributes(Attributes attrs) throws NamingException {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void serverStartup() throws Exception {
4949

5050
List<String> list = ldapTemplate.search(LdapQueryBuilder.query().where("objectclass").is("person"),
5151
this::mapFromAttributes);
52-
assertThat(list.size()).isEqualTo(5);
52+
assertThat(list).hasSize(5);
5353
}
5454

5555
private String mapFromAttributes(Attributes attrs) throws NamingException {

test-support/src/test/java/org/springframework/ldap/test/unboundid/TestContextSourceFactoryBeanTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void serverStartup() throws Exception {
4949

5050
List<String> list = ldapTemplate.search(LdapQueryBuilder.query().where("objectclass").is("person"),
5151
this::mapFromAttributes);
52-
assertThat(list.size()).isEqualTo(5);
52+
assertThat(list).hasSize(5);
5353
}
5454

5555
private String mapFromAttributes(Attributes attrs) throws NamingException {

0 commit comments

Comments
 (0)