有没有办法测试 Windows Phone 7 类库?通常(对于 WinForms 或 WPF 应用程序)我创建单独的类库并添加对 nunit.framework.dll 和我想要测试的类库的引用。
在这里,如果我创建新的 Windows Phone 类库,它不允许我添加对 NUnit 框架程序集的引用。
如果我创建常用的类库,它显然允许我引用 NUnit,但不允许添加对我想要测试的 Windows Phone 类库的引用。
闭环 :)
关于如何执行单元测试有什么想法吗?
UPD:我认为目前还没有合适的解决方案。有一种原始的手工解决方案(甚至不是 alpha)http://wptestlib.codeplex.com/。
UnitDriven 和 Silverlight 单元测试框架可以使用,除非您想要测试特定于设备的内容。即不可能在这些项目中引用 WP7 特定的程序集。
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.
发布评论
评论(1)
查看单元驱动或Silverlight 单元测试框架。
Check out Unit Driven or the Silverlight Unit Test Framework.