I’ve recently undertaken another round of evaluating .NET mocking (fake/substitute/dummy/stub/ or what ever you want to call them now) libraries. Interestingly the landscape has changed quite a bit since last time I went through this exercise, which was about two years ago. The outcome of the previous investigation is at the bottom of this post.
- Who is the creator. I’ve favoured teams rather than individuals, as individuals move on, then where does that leave the product? RhinoMocks is a prime example of this. It’s was an excellent library. maybe a new owner, maybe not.
- Does it do what we need it to do?
- Are there any integration problems with all of our other chosen components? Works with .Net versions the development team are using. Any other complaints around integration?
- Cost in money. Is it free? Are there catches once you get further down the road? Usually open source projects are marketed as is. No catches
- Cost in time. Is the set-up painful? Customisation feedback? Upgrade feedback?
- How well does it appear to be supported? What do the users say?
- Documentation. Is there any / much? What is it’s quality?
- Community. Does it have an active one? Are the users getting their questions answered satisfactorily? Why are the unhappy users unhappy (do they have a valid reason).
- Release schedule. How often are releases being made? When was the last release?
How the Playing Field Looks Today
NSubstitute (new style)
FakeItEasy (new style)
How the Playing Field Looked Two Years Ago
Free and open source.
Very full featured.
Easy enough to use.
logical and consistent syntax.
Most up to date documentation (best place to start)
somewhat out of date documentation, but more of it than the above link.
Community, Download, More code examples here.
Example of the old record/playback syntax as opposed to the new AAA syntax.
Keeping up to date on the progress of Rhino Mocks.
The most popular mocking framework two years ago.
Clean discoverable API design and lack of complicated record/playback model, which is nice.
Have used this, and haven’t had any issues I couldn’t get around.
Very easy to learn and use.
Commercial product (expensive, so not really viable).
Ability to mock anything including statics, privates and events on multiple languages.
Appears to be abandoned