Reputation: 243
I want to generate a unit test on my wp7 app.
So I go to vs2010 -> test -> new basic unit test.
vs2010 generates a new test project in my solution, and I want to start coding. Now the problems begin.
How do I make the classes and methods from my wp7 app project accessable? When I add a reference to the app in my test project, it does not help me, because I get:
Warning 2 The project 'foo' cannot be referenced. The referenced project is targeted to a different framework family (Silverlight)
What should I do?
Upvotes: 2
Views: 295
Reputation: 84744
In addition to Adam's answer, the WP7-CI project adds an MSBuild task to the SL Test Framework so that the tests can be run from a build server.
Upvotes: 2
Reputation: 64487
You need to use the Silverlight Unit Test framework:
http://channel9.msdn.com/Events/MIX/MIX10/CL59
Then you use Jeff Wilcox's unit test runner, which is a phone app:
I do this with success.
Upvotes: 2