Run the tests in the attached Maven project.
The test runs this code:
PowerMockito.doThrow(new RuntimeException()).when(app).finalMethod();
But it "forgets" to prepare the class for test.
Actual: Exception not thrown; the test fails and it's not clear why.
Expected: When I try to mock out a final method, but the class isn't prepared
for test, I wish PowerMock would give me an error message reminding me to
prepare. (Or, even better, just PrepareForTest on the fly!)
(I lost an hour on this today. :-p)
Original issue reported on code.google.com by dan.fabu...@redfin.com on 19 May 2011 at 1:43
Original issue reported on code.google.com by
dan.fabu...@redfin.com
on 19 May 2011 at 1:43Attachments: