3 ms·
One can precisely handle exceptions with JUnit's ExpectedException: http://kentbeck.github.com/junit/javadoc/4.10/org/junit/rules/ExpectedException.html http:/
by gaul 14y ago
One can precisely handle exceptions with JUnit's ExpectedException:
http://kentbeck.github.com/junit/javadoc/4.10/org/junit/rules/ExpectedException.html http://kentbeck.github.com/junit/javadoc/4.10/org/junit/rule...
This is more compact and declarative than the usual
try {
...;
fail();
} catch (...) {
// expected
}