If I add the following test when using MSTEST
[TestMethod]
[ExpectedException(typeof(Y2KException))]
public void EndOfWorldCheckerTest()
{
// scope the shim otherwise it will fail, this is so it does not last forever.
using (ShimsContext.Create())
{
var asyncClass = new AsyncExamples();
ShimDateTime.NowGet = () => new DateTime(2000, 1, 1);
asyncClass.CheckIfEndOfWorld();
}
}
}
I get this error
Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationException: UnitTestIsolation instrumentation failed to initialize. Please restart Visual Studio and rerun this test
I have restarted, and Test Explorer shows that the test passes.