-
-
Save mariuszs/23f4e1e1857c28449b61 to your computer and use it in GitHub Desktop.
Certain exception
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
import org.junit.Test; | |
import static com.googlecode.catchexception.CatchException.caughtException; | |
import static com.googlecode.catchexception.apis.BDDCatchException.then; | |
import static com.googlecode.catchexception.apis.BDDCatchException.when; | |
public class FooTest { | |
private SomeService foo = new SomeService(); | |
@Test | |
public void testDoThat() { | |
when(foo).doStuff(); | |
then(caughtException()).isExactlyInstanceOf(IndexOutOfBoundsException.class); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, can you tell me which dependency among this list, do I need to add in my pom.xml to use this?
Thanks in advance.