PartCover shows 0% coverage for getter and 100% coverage for setter despite the code being commented
- by Gorgsenegger
Hi all,
I have a public property in my code as below:
[DependencyInjection]
public IEVentController EventController
{
get;
set;
}
I also have a line of code referencing the EventController property:
EventController.ExecuteObjectEvents( someObject, null );
Now currently (due to some missing implementation in another part of the application) I commented both these code sections out. Nevertheless, when I run PartCover it shows me a coverage of 0% for get_EventController and 100% for set_EventController. The strange thing is, that the Coverage Details view also correctly shows me that the code is commented out and therefore should not be treated as code - why does PartCover recognise it anyway? I would have expected to not get the getter and setter listed in the PartCover result.
There is definitely no other reference to that code in the class to be tested, any ideas?
Thanks in advance &
Best regards
G.