开发者

Testing database on Windows Phone 7 mango

开发者 https://www.devze.com 2023-04-04 03:30 出处:网络
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 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

精彩评论

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

关注公众号