1
0
mirror of synced 2026-08-05 17:57:15 +00:00

Polish AssertJ assertions

Polish AssertJ assertions
This commit is contained in:
Antoine
2017-04-13 16:13:52 +02:00
committed by Rob Winch
parent a558d408a3
commit e0aca04a28
36 changed files with 154 additions and 179 deletions
@@ -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]);
}
@@ -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();