Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Does Ncrunch support Shim scope
chadit
#1 Posted : Thursday, March 14, 2013 8:45:29 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/7/2013(UTC)
Posts: 5
Location: United States of America

Was thanked: 1 time(s) in 1 post(s)
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.
Remco
#2 Posted : Thursday, March 14, 2013 8:57:25 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,989

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi, thanks for posting!

Right now NCrunch doesn't yet support working with MS Fakes Shims, as these rely on a certain profiler to be loaded into the test environment. Support is currently planned for NCrunch Version 2.


Cheers,

Remco
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.024 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download