Here's a very simple use case:
[Test]
public void Failure()
{
// Do stuff
Assert.IsTrue( false );
}
I'm using the latest TypeMock, NUnit 2.5.8 and TestDriven 3. With the test fixture NOT marked as Isolated, I get the following result:
Test 'TypeMock.Tests.Failure' failed:
Expected: True
But was: False
Tests.cs(199,0): at TypeMock.Tests.Failure()
If however I mark the class Isolated, I see the following:
Test 'TypeMock.Tests.Failure' failed:
Expected: True
But was: False
at TypeMock.MockManager.a(String A_0, String A_1, Object A_2, Object A_3, Boolean A_4, Boolean A_5, Object[] A_6)
at TypeMock.InternalMockManager.getReturn(Object that, String typeName, String methodName, Object methodParameters, Boolean isInjected, Boolean isInterceptedType)
Tests.cs(0,0): at TypeMock.Tests.Failure()
Sometimes, the last line would have a line number, e.g. Tests.cs(190,0), but pointing to the method start, not the actual failing line. In the example above it just goes to the first line in the file.
I'm seeing the same behavior in the NUnit GUI (run via TMockRunner). Is this a bug?