I’m working from the XunitContrib codeplex page and toward the bottom it lists these steps
For Windows Phone 7
Follow along with this blog post
Create a Windows Phone application
Add references to:
- Microsoft.Silverlight.Testing.dll (Silverlight 3 version – included in release)
- xunit-silverlight-wp7
- xunit.extensions-silverlight-wp7
- xunitcontrib.runner.silverlight.toolkit-wp7
Visual Studio may display warnings about including Silverlight 3 assemblies. Ignore it, these are the right files
Add [Fact] based tests and run the app (note- the blog post mentioned isn’t using fact based tests so I’m even more confused …)
But after I add the above mentioned dll’s and start with something like the below … resharper and I can’t seem to hookup the testing harness enough to compile. Has anyone actually wired up a unit test with xunit for WP7?
public class MyFirstWp7Test
{
[Fact]
public void Can_Run_Test_For_WP7()
{
var x = "hello world";
Assert.Equal("hello world", x);
}
}
I finally found a way to test-drive my app on the WP7 platform using NUnit and ReSharper.
I did a short screencast on my blog for a full “how-to” of sorts
http://toranbillups.com/blog/archive/2011/07/24/Test-Driving-My-Windows-Phone-7-App