Bashir Magomedov
Bashir Magomedov

Reputation: 2891

How to test windows phone 7 class library?

Is there any way to test a Windows Phone 7 Class library? Usually (for WinForms or WPF applications) I create separate class library and add reference to nunit.framework.dll and to a class library which I want to test.

Here, if I create new Windows Phone class library it doesn’t allow me to add reference to NUnit framework assembly.

If I create usual Class library, it obviously allows me to refer to NUnit, but doesn’t allow to add reference to the Windows Phone Class library that I want to test. Closed loop :)

Any ideas on how I can perform my unit-testing?

UPD: I think that there is no proper solution yet. There is one raw hand-made solution(that is not even in alpha) http://wptestlib.codeplex.com/. UnitDriven and Silverlight Unit Test Framework can be used unless you want to test something device specific. I.e. it is impossible to refer WP7 specific assemblies in these projects.

Upvotes: 3

Views: 874

Answers (1)

JP Alioto
JP Alioto

Reputation: 45127

Check out Unit Driven or the Silverlight Unit Test Framework.

Upvotes: 1

Related Questions