关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。
想改进这个问题?将问题更新为 on-topic对于堆栈溢出。
6年前关闭。
Improve this question
当我编写单元测试时,我喜欢使用 Rhino Mocks。
因此,当我开始我的第一个 Windows 应用商店应用程序时,我自然而然地首先开始了我的单元测试。当我尝试添加 RhinoMocks通过NuGet我收到以下错误
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.
我对起订量有同样的问题。
.NETCor,Version=v4.5 是否有模拟框架?
最佳答案
大多数模拟框架都基于 Reflection.Emit
.不幸的是 Reflection.Emit
不在 WinRT 中。这意味着你不能做动态代理。 (即运行时模拟)。这留下了在编译时引用的模拟的预生成。我知道的唯一框架是 Moq 的一个实验分支:https://github.com/mbrit/moqrt
关于unit-testing - Windows Store 应用程序的单元测试库中选择的模拟框架是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12083462/