Created
August 29, 2016 13:57
-
-
Save r-winkler/f36218181e00e6a2128561392270c034 to your computer and use it in GitHub Desktop.
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
@Test | |
void exceptionTesting() { | |
Throwable exception = expectThrows(IllegalArgumentException.class, () -> { | |
throw new IllegalArgumentException("id must not be null"); | |
}); | |
assertEquals("id must not be null", exception.getMessage()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment