犀牛模拟vs Typemock vs JustMock vs [英] Rhino mock vs Typemock vs JustMock vs

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

问题描述

我需要为新项目选择模拟框架.

I need to choose mock framework to new project.

这些框架的优缺点是什么? 有比较表吗?

What are the pros and cons for those frameworks? Any comparison table?

我知道JustMock是我的Beta阶段,但现在看起来非常好(非常类似于TypeMock)

I know that JustMock is i beta stage but it's look very good right now (very similar to TypeMock)

我对MS Mole怎么办?

I'v What about MS Mole?

推荐答案

在出现JustMock之前,先询问了此问题,然后模拟框架比较非常好-它没有JustMock但是,您会看到每个.NET模拟框架的语法和功能.

Before there was JustMock this question was asked and the answers can be found here. There is a very good Mocking framework comparison - it doesn't have JustMock yet but you get to see the syntax and capabilities of each .NET mocking framework.

RhinoMocks (和 Moq )都是开放源代码的免费项目,它们可以通过继承类型创建伪造的对象-这意味着它们不能伪造静态方法,结构和密封类.

RhinoMocks (and Moq) are both open source free to use projects that can create fake objects by inheriting the type - which means that they can not fake static methods, structs and sealed classes.

Typemock隔离器使用CLR分析器来拦截.NET调用并在运行时对其进行更改,并且几乎可以伪造任何东西. Typemock还可以伪造您无法从测试中到达"的对象,因为它们是在生产代码中实例化的. 有些人称其为黑魔法",而另一些人则发现必须能够伪造任何东西,包括第三方库和遗留代码.

Typemock Isolator uses the CLR profiler to intercept .NET calls and change them during runtime and can fake virtually anything. Typemock can also fake objects that you cannot "reach" from the test because they are instantiated inside the production code. Some call it "black magic" but others find the ability to fake virtually anything - including 3rd party libraries and legacy code - a must.

JustMock 是一个新播放器,目前仅在Beta中-它具有一些Typemock隔离器,并且可以在没有探查器API的情况下运行-在这种模式下,就像RhinoMocks. 到底有多少Typemock隔离器功能尚待发现.现在看来,这是朝着正确方向迈出的良好开端,但在成为有效选择之前,还有一段路要走.

JustMock is a new player and right now only in Beta - it has some of Typemock Isolator and can run without the profiler API - in this mode it's just like RhinoMocks. It is yet to be discovered how much of Typemock Isolator capabilities does it really have. Right now it seems that its a good start in the right direction but it still have some distance to go before it could be a valid option.

这篇关于犀牛模拟vs Typemock vs JustMock vs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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