rahmandon / mockito

Automatically exported from code.google.com/p/mockito
1 stars 0 forks source link

Spy prevents coverage measurement on spyed class, if ExpectedException Rule is used #385

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create an unit test, which uses a spy and ExpectedException rule
2. Run this test in eclipse with eclemma
3. Check the converage report. All methods, which were called through the spy 
will have exactly 0% coverage, which is false of course.

What is the expected output? What do you see instead?
A normal coverage report for spyed methods

What version of the product are you using? On what operating system?
Windows 7
Junit 4.10
Mockito 1.9.0
EclEmma Java Code 
Coverage    2.1.4.201208011137  com.mountainminds.eclemma.feature.feature.group Moun
tainminds GmbH & Co. KG
Eclipse 20121004-1855
Java 1.7.0.07

Please provide any additional information below.
I attached an eclipse project containing a demo class and test. Please correct 
the classpath before run.

Original issue reported on code.google.com by gabor.li...@gmail.com on 15 Oct 2012 at 8:57

Attachments:

GoogleCodeExporter commented 8 years ago
Reported to Eclemma as well. Maybe the bug is on their side. 
https://github.com/jacoco/eclemma/issues/16

Original comment by gabor.li...@gmail.com on 17 Oct 2012 at 7:40

GoogleCodeExporter commented 8 years ago
Thanks for reporting. If this is related to Mockito, I'm not sure we'll work on 
it in near future - feel free to take stab on the implementation!

Original comment by szcze...@gmail.com on 17 Oct 2012 at 1:41

GoogleCodeExporter commented 8 years ago

Original comment by brice.du...@gmail.com on 23 Oct 2012 at 8:45

GoogleCodeExporter commented 8 years ago

Original comment by brice.du...@gmail.com on 29 Apr 2013 at 4:15