-
-
Save doohee323/7434209 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import org.junit.Test; | |
| import org.junit.Rule; | |
| import org.junit.rules.ExpectedException; | |
| public class JUnitExceptionTest { | |
| @Rule | |
| public ExpectedException exception = ExpectedException.none(); | |
| @Test | |
| public void testDoWork() { | |
| exception.expect(IllegalStateException.class); | |
| throw new IllegalStateException(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment