I have a small JUnit test that expects an exception to be thrown. The method throws the exception as expected but when I'm running a "Coverage As" run in Eclipse SpringSource ToolSuite, the two lines in the test method stay red instead of turning green. This test passes--no issues there.
The mockPropertyReader is an empty Properties file reader class. I'm simply testing for the exception if the property is malformed or doesn't exist.
I'm just thinking the method lines should be highlighted to green. I like lots of green.
@Test(expected = PropertyNotFoundException.class)
public final void testGetMySQLNotFound() throws PropertyNotFoundException {
subject.setSqlProps(mockPropertyReader);
subject.getMySQL();
}