Testing with Resharper/NUnit

Oct 20, 2011 at 2:28 AM

Hi Tony,

I was following your video (Part 2) on testing. When I used the Microsoft testing as you did in the video, it suceeds. But now when I am usign NUnit and Resharper. I get an error:

1 test failed: Setup : System.TypeInitializationException : The type initializer for 'Undo.InjectedViewModelLocator' threw an exception.

I have set the Agent type to real to use the service agent.

I have referenced -

nunit.framework.dll,
project.dll,
project.web.dll,
simplemvvmtoolkit.dll,
Microsoft.Silverlight.Testing.dll and also had to add System.Windows.

Any ideas?

Coordinator
Oct 20, 2011 at 12:20 PM

You've discovered that NUnit and the Silverlight Testing Framework are not compatible by default.  However, there is a way to make them play nice together.  Check out this blog post for more info:
http://www.jeff.wilcox.name/2009/01/nunit-and-silverlight

Cheers,

Tony

Oct 21, 2011 at 1:10 AM

Hi Tony,

Thanks for your reply and direction. It makes more sense to stick to the Silverlight Testing Framework for now.

Cheers!