Typemock vs最小起订量 [英] Typemock vs Moq

查看:149
本文介绍了Typemock vs最小起订量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经听说了一些关于这两个框架的知识,并决定要使用这两个框架.哪个更好?为什么?

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?

提前谢谢! 耳鼻咽肌

推荐答案

好吧,TypeMock Isolator是一种付费产品,而Moq是FOSS,因此,这可能仅仅是您的决定点.除此之外,我相信TypeMock提供了模拟静态和遗留代码的功能,而这些代码和静态代码是通过标准多态性无法实现的.

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

但是,我想说您的决定等于您愿意花的钱.如果您支付更多,您将获得更多的模拟性".因此,如果您尝试使用大量静态代码对旧版代码进行测试改造,则可能需要TypeMock.如果您正在启动一个绿色项目,并且可以从一开始就编写可测试的代码,那么Moq就是很好的选择.

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.

这篇关于Typemock vs最小起订量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆