Created
April 1, 2015 15:04
-
-
Save ivanursul/bac0bac583210d52d5fa to your computer and use it in GitHub Desktop.
DefaultTest.java for www.ivanursul.com
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
| package org.ivanursul.investigration.rule; | |
| import static org.junit.Assert.assertTrue; | |
| import org.junit.ClassRule; | |
| import org.junit.Rule; | |
| import org.junit.Test; | |
| import org.junit.rules.ExpectedException; | |
| public class DefaultTest { | |
| @Rule | |
| public ExpectedException exception = ExpectedException.none(); | |
| @Test | |
| public void throwsIllegalArgumentExceptionIfIconIsNull() { | |
| exception.expect(IllegalArgumentException.class); | |
| exception.expectMessage("Icon is null, not a file, or doesn't exist."); | |
| throw new IllegalArgumentException("Icon is null, not a file, or doesn't exist."); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment