mockingmoqtypemockjustmock

TypeMock VS JustMock (VS RhinoMock,Moq...): current situation in 2011?


I've started TDD some weeks ago. I have to do Unit Tests on a C# code full of non-virtual methods and there is no much interface either. Therefore, after I've been studying RhinoMock and Moq, a proxy solution wasn't enough: what I need is an isolation thanks to a profiler.

From what I read, I have 3 choices:

  1. TypeMock Isolator, very powerful but also very expensive
    http://www.typemock.com/
  2. JustMock of Telerik, the alternative to TypeMock which aims to be TypeMock, but the beta was full of bugs
    http://www.telerik.com/products/mocking.aspx
  3. Moles from Microsoft Pex, the only free solution for isolation but definitively not a mocking-framework, see here

I need mocks easy to configure. Moles don't provide advanced declarative verification feature and it is a pain to do it myself.

TypeMock is a good solution, but certainly a little to much for what I really need and I found the price too high.

JustMock should make some concurrence, but I don't found many references. It's a shame, its syntax is close to Moq and it should be a good transition (and I could switch to the free version with a cleaner code, thanks to dependency injection for example). But TypeMock was launched in 2006 while Justmock still was beta in 2010, there was a glaring gap (although Telerik has good marks). The Q2 fixing bugs was released in July 2010.

Question: Does the last version of JustMock is enough effective? Are they some satisfied users?

(good free references ONLY for interface/delegates/non-virtual methods:)
see http://www.ayende.com/projects/rhino-mocks.aspx
see http://code.google.com/p/moq/
see http://www.nmock.org/


Solution

  • [Redundant Full-Disclosure: I work for Telerik.]

    Focusing on JustMock, I think you'll find the latest version is a very capable mocking tool with few known bugs for the core mocking experience. Telerik's approach has been to focus on making mocking easier (via a simple API + integration with other Telerik tools, like JustCode) and more accessible (free version + low commercial license cost).

    While Telerik is relatively new to the mocking game, that actually benefits our approach by being able to do everything right the first time, with no out-moded legacy modes to clutter the API or documentation.

    A key advantage, as you note, is that JustMock is available for Free (for mocking interface/delegates/non-virtual method). If you then need the ability to mock items requiring the profiler, it's a simple upgrade to the commercial version's power. Same API. Same tool. Just more power with the profiler.

    Best thing to do is give it a try. http://www.telerik.com/justmock

    You can also check a recent recorded webinar freaturing JustMock on Telerik TV to see the current version (Q1 2011) in action: http://tv.telerik.com/watch/telerik/test-drive-your-code-with-justmock

    Hope that helps.