Polish AssertJ assertions
Polish AssertJ assertions
This commit is contained in:
+1
-1
@@ -157,7 +157,7 @@ public class SpringSecurityLdapTemplateITests extends AbstractLdapIntegrationTes
|
||||
protected void assertAttributeValue(Map<String, List<String>> record,
|
||||
String attributeName, String... values) {
|
||||
assertThat(record.containsKey(attributeName)).isTrue();
|
||||
assertThat(record.get(attributeName).size()).isEqualTo(values.length);
|
||||
assertThat(record.get(attributeName)).hasSize(values.length);
|
||||
for (int i = 0; i < values.length; i++) {
|
||||
assertThat(record.get(attributeName).get(i)).isEqualTo(values[i]);
|
||||
}
|
||||
|
||||
+1
-1
@@ -122,7 +122,7 @@ public class NestedLdapAuthoritiesPopulatorTests extends AbstractLdapIntegration
|
||||
circularJavaDevelopers, jDevelopers, groovyDevelopers));
|
||||
|
||||
LdapAuthority[] ldapAuthorities = authorities.toArray(new LdapAuthority[0]);
|
||||
assertThat(ldapAuthorities.length).isEqualTo(5);
|
||||
assertThat(ldapAuthorities).hasSize(5);
|
||||
// closure group
|
||||
assertThat(ldapAuthorities[0].getAttributes().containsKey("member")).isTrue();
|
||||
assertThat(ldapAuthorities[0].getAttributes().get("member")).isNotNull();
|
||||
|
||||
Reference in New Issue
Block a user