steinarb commented on code in PR #2940:
URL: https://github.com/apache/shiro/pull/2940#discussion_r4473064443
##########
core/src/test/java/org/apache/shiro/authc/AbstractAuthenticatorTest.java:
##########
@@ -201,11 +192,8 @@ protected AuthenticationInfo
doAuthenticate(AuthenticationToken token) throws Au
};
AuthenticationToken token = newToken();
- try {
- abstractAuthenticator.authenticate(token);
- fail("the expected AuthenticationException was not thrown");
- } catch (AuthenticationException ignored) {
- }
+ assertThatExceptionOfType(AuthenticationException.class)
Review Comment:
Nice.
But just for the record JUnit jupiter assertThrows() isn't too bad either
(it's what I use most of the time, even though I use AssertJ for the all other
asserts)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]