I've got a little Problem.(at unittesting) - I unittest a class where methods raises exceptions. The structure is:
public bool DoA()
{
ThrowException();
return true;
}
public void DoB()
{
ThrowException();
}
private static void ThrowException()
{
throw new NotSupportedException();
}
The result from the CodeCoverage is not 100% - the return statement and the closing curly bracket from DoA() and the closing curly bracket from Do()B are not under the codeCoverage(because they not reached). I know, thats not really important for the unittest because i still checked the functionality but just for me - its possible and how i reach the full CodeCoverage? Maybe through exclude? (possible change the testcode / program code)