Closing bracket after TerminateApplication method

Hi guys,
I have tried to use dotCover for my unit-tests and realized that it is incorrectly counting code coverage for following case:
internal void CheckStatus()
{
    if (FirstCheck())
    {
        RaiseError("status 1");
    }

    if (SecondCheck())
    {
        RaiseError("status 2");

    }

    if (ThirdCheck())
    {
        RaiseError("status 3");

    }

    if (SomeOtherCheck())
    {
        RaiseError("status 4");

    }
}

[TerminatesProgram]
internal static void RaiseError(string message)
{
    throw new ValidationErrorFoundException(message);
}


I have implemented test for each check, but code is not covered for 100%. dotCover marked closing curly brace after each RaiseError call as non-covered code, which obviously does not make sense.
Is it a bug, or there is some workaround?

Thanks.

0
1 comment

Hello Victor,


Thank you for the info.
This is a known issue, here is a corresponding entry in our tracker:
http://youtrack.jetbrains.net/issue/DCVR-1577
You're welcome to watch it's status.
0

Please sign in to leave a comment.