Created
January 22, 2020 20:17
-
-
Save jbleduigou/a47a144b5113ce3f6b16ee487ee1db38 to your computer and use it in GitHub Desktop.
An IntelliJ live template for asserting exceptions with Junit 5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Throwable exception = assertThrows(IllegalArgumentException.class, () -> $SELECTION$); | |
assertThat( | |
exception.getMessage(), | |
is("Okay, Houston, we've had a problem here")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment