1
0
mirror of synced 2026-05-22 21:33:16 +00:00

Replace expected @Test attributes with AssertJ

Replace JUnit expected @Test attributes with AssertJ calls.
This commit is contained in:
Phillip Webb
2020-09-10 21:33:16 -07:00
committed by Josh Cummings
parent 20baa7d409
commit c502312719
243 changed files with 2115 additions and 1591 deletions
@@ -25,6 +25,7 @@ import org.springframework.security.authentication.TestingAuthenticationToken;
import org.springframework.security.core.context.SecurityContextHolder;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
public class SecurityEvaluationContextExtensionTests {
@@ -40,9 +41,9 @@ public class SecurityEvaluationContextExtensionTests {
SecurityContextHolder.clearContext();
}
@Test(expected = IllegalArgumentException.class)
@Test
public void getRootObjectSecurityContextHolderAuthenticationNull() {
getRoot().getAuthentication();
assertThatIllegalArgumentException().isThrownBy(() -> getRoot().getAuthentication());
}
@Test