TD mistakenly shows full coverage - NCover/NCoverExplorer do
TD mistakenly shows full coverage - NCover/NCoverExplorer do
I was playing around to see how exceptions are counted as being covered or not and saw correct behavior from NCover and NCoverExplorer, however when I ran using TD "Test With ... Coverage" it is not reporting the same coverage.
Versions:
VS 2005
TD.Net v2.0.1948
NCoverExplorer v1.3.5.1921
NCover -- TD has v1.5.6, however I have v1.5.4 installed ?? I tested both w/ the command line and it worked.
-------------------------------------------
using System;
namespace TestTreeProject.Core
{
public class Class1
{
public void bar()
{
try
{
foo(true);
} // <-- This line should be red. It is not w/ TD. It is using NCover directly.
catch
{
Console.WriteLine("Caught exception");
}
}
public void foo(bool throwException)
{
if (throwException)
throw new Exception("Throwing an exception");
Console.WriteLine("No exception");
}
}
}
---------------------------------