加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

单元测试 – Windows Store应用程序的单元测试库中的嘲笑框架是

发布时间:2020-12-13 20:59:56 所属栏目:Windows 来源:网络整理
导读:当我写单元测试时,我喜欢使用Rhino Mocks。 所以当我开始我的第一个Windows Store应用程序时,我首先从我的单元测试开始。当我尝试通过NuGet添加RhinoMocks时收到以下错误 Could not install package ‘RhinoMocks 3.6.1’. You are trying to install this
当我写单元测试时,我喜欢使用Rhino Mocks。

所以当我开始我的第一个Windows Store应用程序时,我首先从我的单元测试开始。当我尝试通过NuGet添加RhinoMocks时收到以下错误

Could not install package ‘RhinoMocks 3.6.1’. You are trying to
install this package into a project that targets
‘.NETCore,Version=v4.5’,but the package does not contain any assembly
references that are compatible with that framework. For more
information,contact the package author.

我和Moq有同样的问题。

.NETCor,Version = v4.5有一个嘲笑的框架吗?

大多数嘲笑框架基于Reflection.Emit。不幸的是Reflection.Emit不在WinRT中。这意味着你不能做动态代理。 (即运行时嘲笑)。这使得在编译时引用的前代的嘲笑。我唯一知道的框架是Moq: https://github.com/mbrit/moqrt的实验性分支

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读