Running this test:
using NUnit.Framework;
using TypeMock.ArrangeActAssert;
[TestFixture, Isolated]
public class Tests
{
[Test]
public void Test()
{
new System.Windows.Forms.ListView();
}
}
With Isolator 8.0.1 and NUnit 2.6.2 as invoked by TestDriven.NET 3.8 in Visual Studio 2013 Update 5 CTP results in this output on my machine:
------ Test started: Assembly: IBStratBench.Tests.dll ------
Test 'Tests.Test' failed: System.AccessViolationException : Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at System.Drawing.SafeNativeMethods.Gdip.GdipGetLogFontW<<Swapped(HandleRef , HandleRef , Object )
at System.Drawing.SafeNativeMethods.Gdip.GdipGetLogFontW(HandleRef font, HandleRef graphics, Object lf)
at System.Drawing.Font.ToLogFont(Object logFont, Graphics graphics)
at System.Drawing.Font.ToLogFont(Object logFont)
at System.Drawing.Font.ToHfont()
at System.Windows.Forms.Control.FontHandleWrapper..ctor(Font font)
at System.Windows.Forms.Control.GetDefaultFontHandleWrapper()
at System.Windows.Forms.Control.get_FontHandle()
at System.Windows.Forms.ListView..ctor()
Tests.cs(10,0): at Tests.Test()
at TypeMock.MockManager.getReturn(Object context, String typeName, String methodName, Object methodGenericParams, Boolean isDecorated, Boolean isInterceptedType, Object[] methodArguments)
at Typemock.Interceptors.Profiler.InternalMockManager.getReturn(Object that, String typeName, String methodName, Object methodParameters, Boolean isInjected, Boolean isInterceptedType)
Tests.cs(9,0): at Tests.Test()
0 passed, 1 failed, 0 skipped, took 2.62 seconds (NUnit 2.6.2).
This apparent bug is new in Isolator 8.0.1. My ListView-newing tests used to pass in the previous 7 version of Isolator.