I have a small JUnit test waiting for an exception. The method throws an exception as expected, but when I run "Coverage As" in the Eclipse SpringSource ToolSuite, the two lines in the test method remain red, not green. This test passes - no problem.
MockPropertyReader is an empty class for reading property files. I just check the exception if the property is garbled or does not exist.
I just think the method lines should be highlighted in green. I like a lot of green.
@Test(expected = PropertyNotFoundException.class) public final void testGetMySQLNotFound() throws PropertyNotFoundException { subject.setSqlProps(mockPropertyReader); subject.getMySQL(); }
source share