Calls through an interface are not marked as covered
Calls through an interface are not marked as covered
I wrote some tests that call an implicit implementation of an interface (through an interface reference of course). But these are not being marked as having been covered. I stepped through with the debugger and the code is being executed.
Here is an example of one of the methods that is not being marked as covered:
void IList.Insert(int index, object value)
{
throw new NotImplementedException("Operation not supported");
}
Here is test code that calls it:
[Test]
public void InvalidIListOperations()
{
...
IList iList = (IList)ownedArray;
try
{
iList.Insert(0, 1);
Assert.Fail("We should not be here (Insert)");
}
catch (NotImplementedException)
{
Assert.IsTrue(true); // flag success
}
}
Re: Problems with NCover 1.3.3 and NUnit
I think I made it work now... just to share with those who are new to everything, like me!!
This command line would work:
> ncover-console /c nunit-console UnitTest.dll /w "c:\program files\..." /l "c:\program files\ncover\coverage.log" /o "c:\program files\ncover\coverage.xml
Cheers!