You can tell junit that the correct behavior is to get an exception.
In JUnit 4, it goes something like:
@Test(expected = MyExceptionClass.class)
public void functionUnderTest() {
…
}
You can tell junit that the correct behavior is to get an exception.
In JUnit 4, it goes something like:
@Test(expected = MyExceptionClass.class)
public void functionUnderTest() {
…
}