0

I need to write unit tests for my WP7 app. Tests are run on desktop(not on device or emulator). The problem is when i try creating DataContext class on desktop framework it fails in ctor.

I use WindowsPhone's mscorlib(2.0.5.0) in references.

Looks like it needs some DLL's from phone, but im not sure what.

Possibly someone had same problem.

Thanx!

4

1 回答 1

1

您在使用 Silverlight 单元测试框架吗?在这种情况下,恐怕无法从 SL 应用程序访问 SQL Server CE。请参阅silverlight 客户端能否访问存储在隔离存储中的本地 sql 紧凑型数据库

我认为你最好的办法是模拟数据上下文

于 2011-09-12T19:22:56.660 回答