FortuneN / FineCodeCoverage

Visualize unit test code coverage easily for free in Visual Studio Community Edition (and other editions too)
https://marketplace.visualstudio.com/items?itemName=FortuneNgwenya.FineCodeCoverage
Other
506 stars 38 forks source link

Inconsistent highlighting for C# sub-classes or multiple classes in one file #430

Closed geh24 closed 2 weeks ago

geh24 commented 2 weeks ago

Installed product versions

Description

1) The highlighting is inconsistent if a class is a C# sub-class 2) The hightlighting is missing if the order of classe within a file ar changed

Steps to recreate

  1. Please see my repo https://github.com/geh24/FCC It is a really small test-project and just run the Unit-Test and in MulHelper2.multiply all lines are highlighted correctly but in MulHelper1.multiply only the first line is highlighted.

I except all three lines 24-26 to be highlighted. FccMath01 I already checked the Cobertura.xml file and in that file all lines 24-26 are marked as hits.

  1. If the order of the classes FCCMath and MulHelper2 are changed, please see the branch ClassExchange (just run the UnitTest) and then no line of MulHelper2 is highlighted even it is run (a breakpoint will be hit) FccMath02

Expected behavior

All lines of code that are run during a unit-test should be highlighted, independently whether it is a sub-class or the order of classes within a file.

I will attach screenshots and Cobertura.xml files for both cases.

Side Notes

I hope to hear from you best regards Gerhard

tonyhallett commented 2 weeks ago

I should be able to look at this tomorrow

tonyhallett commented 2 weeks ago

fixed. Thanks for reporting the issue. Will be available on the marketplace shortly.

geh24 commented 2 weeks ago

Hi Tony, i just ried it with a really complicated EF-Core prject and the fix works perfect.

thank you Gerhard