犀牛Mo紧凑框架 [英] Rhino Mocks & Compact Framework

查看:129
本文介绍了犀牛Mo紧凑框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试验Rhino Mocks,以对我的.Net Compact Framework应用程序进行单元测试,但遇到了问题.我可以使用内置的Rhino Mocks获得基本的单元测试,但是每次运行包含Rhino Mocks代码的测试时,该测试都会失败,因为它找不到Rhino Mocks程序集.

I've been experimenting with Rhino Mocks for unit testing my .Net Compact Framework application, and have hit a problem. I can get a basic unit test using Rhino Mocks built, but every time I run the test that has the Rhino Mocks code in it, the test fails because it can't find the Rhino Mocks assembly.

System.TypeLoadException:无法从程序集"Rhino.Mocks"中加载类型"Rhino.Mocks.MockRepository".

System.TypeLoadException: Could not load type 'Rhino.Mocks.MockRepository' from assembly 'Rhino.Mocks...

我已将Rhino模拟dll复制到设备上的各个位置(我的应用程序文件夹以及创建的SmartDeviceTest文件夹),但似乎仍然找不到.

I've copied the rhino mocks dll to various places on the device (my app folder, and the SmartDeviceTest folder that gets created) but it still can't seem to find it.

有人在紧凑的框架上使用过犀牛模拟游戏,可以指出正确的方向吗?否则,谁能提出一个可以与紧凑型框架集成并与之兼容的模拟框架?

Has anyone used rhino mocks with the compact framework and can point me in the right direction? Or failing that, can anyone suggest a mocking framework that does integrate and work with compact framework?

谢谢

马特

推荐答案

我敢打赌,它找不到依赖项. IIRC,Rhino使用了很多CompilerServices和Reflection.Emit片段,这些片段在CF中根本不存在,因此在尝试生成模拟时可能会呕吐.我还没有看到任何可与CF配合使用的模拟框架,并且已经做了很多查找(并尝试移植).

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).

这篇关于犀牛Mo紧凑框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆