tags:

views:

40

answers:

1

I am trying to use moles with NUnit and am getting the following error "Moles requires tests to be an instrumented process". I am also using Visual NUnit within Visual Studio 2008 to get this working. Any help is welcome.

A: 

You can't run MS Moles with NUnit from within Visual Studio. You must either use MSTest (Visual Studio Unit Tests) to do that or you can run your NUnit tests with Moles from the command line.See the reference manual.

A possible alternative: If it fits your needs, you may use the Gallio automation platform to run all kinds of test frameworks (in your case NUnit and MSTest) side by side...

HTH! Thomas

Thomas Weller
I also tried following the reference manual you listed and I get the following errors on all of the Tests "Microsoft.Moles.Framework.Moles.MoleInvalidOperationException : Moles Context not created. Use MolesContext.Create" Any ideas on how to solve that? Not a whole lot of documentation out there.
Seth
Did you correctly use the 'MoledType' attribute for the moled type and run the tests via the NUnit command line runner, as it is described in the manual? I can assure you, that it works...
Thomas Weller