1
0
mirror of synced 2026-08-04 01:07:02 +00:00

Polish more AssertJ assertions

This commit is contained in:
Antoine
2017-04-13 17:24:11 +02:00
committed by Rob Winch
parent e0aca04a28
commit 0771778b81
14 changed files with 47 additions and 49 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -181,12 +181,12 @@ public class TestHelperTests {
public void testCreateAuthorityList() {
List<GrantedAuthority> authorities1 = HierarchicalRolesTestHelper
.createAuthorityList("ROLE_A");
assertThat(1).isEqualTo(authorities1.size());
assertThat(authorities1).hasSize(1);
assertThat(authorities1.get(0).getAuthority()).isEqualTo("ROLE_A");
List<GrantedAuthority> authorities2 = HierarchicalRolesTestHelper
.createAuthorityList("ROLE_A", "ROLE_C");
assertThat(2).isEqualTo(authorities2.size());
assertThat(authorities2).hasSize(2);
assertThat(authorities2.get(0).getAuthority()).isEqualTo("ROLE_A");
assertThat(authorities2.get(1).getAuthority()).isEqualTo("ROLE_C");
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -262,7 +262,7 @@ public class JdbcUserDetailsManagerTests {
manager.renameGroup("GROUP_0", "GROUP_X");
assertThat(template.queryForObject("select id from groups where group_name = 'GROUP_X'",
Integer.class)).isEqualTo(0);
Integer.class)).isZero();
}
@Test