另请参阅我应该考虑什么什么时候选择一个模拟框架.Net"
我正在尝试决定在我最近开始的 .NET 项目中使用的模拟框架.我想加快我对不同框架的研究.我最近阅读了这篇博文 http://codevanced.net/post/Mocking-frameworks-comparison.aspx 并想知道 StackOverflow 的任何观众是否有任何东西可以添加到框架的实际优势和警告中.
I'm trying to decide on a mocking framework to use on a .NET project I've recently embarked on. I'd like to speed my research on the different frameworks. I've recently read this blog post http://codevanced.net/post/Mocking-frameworks-comparison.aspx and wondered if any of the StackOverflow audience has anything to add in the way of real-world advantages and caveats to the frameworks.
人们能否列出他们当前使用的模拟框架的优点/缺点,或者他们已经研究过在 .NET 项目中自己使用的模拟框架的优缺点.我认为这不仅有助于我决定我当前的项目,而且还有助于其他人在为他们的情况选择正确的框架时做出更明智的决定.我不是任何框架的专家,但我想获得支持和反对我遇到的主要框架的论据:
Could people could list the pros/cons of the mocking frameworks they either currently use or have investigated for their own use on .NET projects. I think this would be not only a help to me to decide for my current project, but it will help others make more informed decisions when picking the correct framework for their situation. I'm not an expert on any of the frameworks but I would like to get arguments for and against the major frameworks I've come across:
以及我错过的其他可用替代品.我还想了解因问题而切换或停止使用产品的用户的见解.
And other usable alternatives that I've missed. I'd also like insights from users that have switched or stopped using products because of issues.
我根本不了解 Moles,但我会介绍一些我知道的(不过我真的需要一张桌子).
I don't know Moles at all, but I'll cover the ones I know a bit about (I really need a table for this, though).
起订量
优点
缺点
犀牛模拟
优点
缺点
TypeMock 隔离器
优点
缺点
NMock
优点
缺点
请注意,特别是关于 TypeMock 的优点和缺点是非常有争议的.我在我的博客上发表了我自己对此事的看法.
Please note that particularly the advantages and disadvantages regarding TypeMock are highly controversial. I published my own take on the matter on my blog.
我在 2003 年开始使用 NMock,当时它是唯一的选择,然后因为其类型安全性而迁移到 Rhino Mocks,现在因为 API 更简单而使用 Moq.
I started out with NMock when that was the only option back in 2003, then migrated to Rhino Mocks because of its type safety, and now use Moq because of the simpler API.
这篇关于每个主要的模拟框架在现实世界中的优缺点是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!