Rhino Mocks & Compact Framework

若如初见. 提交于 2019-12-04 08:51:54

My bet is that it can't find a dependency. IIRC, Rhino uses a lot of the CompilerServices and Reflection.Emit pieces which simply don't exist in the CF, so it's probably puking when trying to generate the mocks. I've not seen any mocking framework that works with the CF, and I've done quite a bit of looking (and trying to port).

I wrote a blog post on just this a few months ago: http://elegantcode.com/2009/04/29/unit-testingmocking-on-net-cf/

Anyway, RhinoMocks, Moq, and TypeMock do not work on .netcf. Stubs from PEX (a Microsoft Research project) can work in theory, but is not there yet.

The key is to make stub classes instead of Mock classes (google search "Mocks are not Stubs")

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!