You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assertj-automation would try to convert org.junit.jupiter.api.Assertions.assertThrows to an assertThatThrownBy assertion when the return value of assertThrows is used:
However assertThatThrownBy does not return the exception.
What did you want to happen?
Maybe use catchThrowableOfType instead when the returned exception is used in follow-up code. Arguably, it could also be a hint to refactor the test code to do follow up assertions on the exception with chained methods on the assertThatThrownBy clause.
The text was updated successfully, but these errors were encountered:
What happened?
assertj-automation would try to convert
org.junit.jupiter.api.Assertions.assertThrows
to anassertThatThrownBy
assertion when the return value ofassertThrows
is used:However
assertThatThrownBy
does not return the exception.What did you want to happen?
Maybe use
catchThrowableOfType
instead when the returned exception is used in follow-up code. Arguably, it could also be a hint to refactor the test code to do follow up assertions on the exception with chained methods on theassertThatThrownBy
clause.The text was updated successfully, but these errors were encountered: