开发者

Testing database on Windows Phone 7 mango

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!


Are you using the Silverlight Unit Testing Framework? In that case, I'm afraid there's no way to access SQL Server CE from a SL application. See Can a silverlight client access a local sql compact database that is stored in isolated storage

I think your best go is to mock the data context.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜