Junit (3.8.1) testing that an exception is thrown (works in unit test, fails when added to a testSui
- by Mike Cargal
I'm trying to test that I'm throwing an exception when appropriate. In my test class I have a method similar to the following:
public void testParseException() {
try {
ClientEntitySingleton.getInstance();
fail("should have thrown exception.");
} catch (RuntimeException re) {
assertEquals(
…