Closed nics71 closed 2 years ago
The following block of code is showing as not included by Unit Tests even the method has the ExcludeFromCodeCoverage attribute.
@nics71 did you nean as included ?Because the exclusion is the expected behavior.
to clarify, line 113 is showing as not covered by a unit test even though the whole block of code is marked as exclude from code coverage. Line 113 is not being excluded as per the attribute
Can you provide a simple repro?
Hi @MarcoRossignoli,
Creating a new method within the same class still gave the red line down the left hand side, it didn't show up in the Fine Code Coverage report as requiring a unit test but did show up in our SonarQube report as "not covered by a unit test"
However, refactoring the method to a new class and marking the method with the attribute, removed the red line, also didn't show up in FCC and was also excluded within SonarQube so happy to go with this option
The following block of code is showing as not included by Unit Tests even the method has the ExcludeFromCodeCoverage attribute.
The line of code that shows the "not covered by unit tests" is an anonymous function call
Using coverlet.collector version 3.1.2and NUnit 3.13.2