Rhino mock vs Typemock vs JustMock vs

Adiel picture Adiel · Apr 14, 2010 · Viewed 11.8k times · Source

I need to choose mock framework to new project.

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

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

Edit: I'v What about MS Mole?

Answer

Dror Helper picture Dror Helper · Apr 14, 2010

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 (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 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 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.