Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有哪些 .NET 模拟或存根框架可以存根诸如 Microsoft Moles之类的非虚拟(甚至静态)方法?有像 RhinoMocks 这样的东西会很好AssertWasCalled。
AssertWasCalled
我知道两个:
事实上,还有一个:Justmock 我已经尝试过这 3 个框架,我选择了Moles。确实,它只是存根东西,将它们变成模拟是你的工作,但最后它并不太难(即使我发现教程不够清楚)。
已经有关于选择什么框架的主题,比如这里。
如果您真的想在通话中进行预编程验证,请花钱购买 Justmock 或 Typemock(更贵但仍然是领先者)。