Closed janssenr closed 5 years ago
@janssenr that would be because the unit test runner never reaches the actual end of the unit test.
Because you're testing an exception, the execution stops at line 21.
But more basically, that's what OpenCover reports, and codecov uses those reports.
@janssenr before I close this issue, I'll leave you with a tip on how to get around it showing the red line (other than ignoring unit testing libraries in the coverage report).
Change your unit test to be along the lines of:
[TestMethod]
public void TestThatInvalidSignatureExceptionIsThrownWhenTheSignaturesDoNotMatch()
{
Assert.ThrowsException(() => MerchantOrderResponseBuilder.InvalidSignatureInstance());
}
See the API documents for additional overloads if you need them: https://docs.microsoft.com/en-us/dotnet/api/microsoft.visualstudio.testtools.unittesting.assert.throwsexception
https://codecov.io/gh/janssenr/RaboOmniKassaApi.Net/src/master/src/RaboOmniKassaApi.Tests/Models/Response/MerchantOrderResponseTest.cs Why is line 23 marked as red?