Search code examples
unit-testingrhino-mocksmoqpex-and-molesmoles

Syntax Comparison between Moq and Rhino mocks


My company is trying to decide if we are going to standardize on Moq, Rhino Mocks or MS Moles and Stubs.

I know Rhino Mocks and Moles and Stubs fairly well. But I am unfamiliar with Moq. How does the syntax work? Does it support Arrange Act Assert (AAA) like Rhino Mocks (I hear they created it, but I am not sure). Does it have strong typing?

Basically, I am leaning towards Rhino Mocks (using Moles where needed). But I don't want to do that just because I am familiar with Rhino Mocks. If Moq is in fact better or (even more important) easier to use, then I want to learn it and pick that one.

So, any one out there that has used both and feels like giving me a syntax comparison?


Solution

  • I've done a multi-part blog series on the differences between a number of mocking frameworks. Feel free to check it out at http://www.richard-banks.org/2010/07/mocking-comparison-part-1-basics.html