Typemock vs Moq [closed]

泪湿孤枕 提交于 2019-12-10 17:41:41

问题


I have heard/read a little about both of these frameworks and have decided I want to use of of the two. Which is better? Why?

Thanks in advance! Oshiwoshydopaliscious


回答1:


Well, TypeMock Isolator is a paid product and Moq is FOSS, so that may be your decision point alone. Beyond that, I believe TypeMock provides the ability to mock statics and legacy code that is unmockable through standard polymorphism.

For blow by blow feature comparisons, there are plenty out there:

http://msmvps.com/blogs/bmains/archive/2009/11/03/moq-and-typemock-in-comparison.aspx

But, I'd say your decision amounts to what you're willing to spend. You get more "Mockability" if you pay more. So, if you're trying to retrofit tests on legacy code with lots of static, you might want TypeMock. If you're starting a green field project and have the luxury of writing testable code from the get-go, Moq is great.



来源:https://stackoverflow.com/questions/9280901/typemock-vs-moq

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!