Last week I gave a presentation on mock objects for Software Professionals of Alaska. Once the PowerPointy hand-waving was out of the way, I illustrated the concepts with code examples using Rhino Mocks. I thought I was well-versed in Rhino Mocks before I started, but in the process of preparing the presentation I realized there was a lot that I didn't know or had forgotten. So I distilled all the main facts and features down into a 3-page quick reference of tables and example usage. You might argue that 3 pages makes it a "slow reference," but regardless I still think it's useful to see all the basics stripped down to the bare minimum. Much of the content came from the Rhino Mocks Documentation Wiki, so look there first if you need more details on a particular feature.
So without further ado, I present the Rhino Mocks 3.3 Quick Reference. It includes:
- the 3 different record/replay syntax styles
- 4 types of mocks, 7 if you include MultiMocks
- expectations and setup
- custom behavior
- assert messages
- ordered and unordered
- the full set of argument constraints
Feedback is quite welcome. Enjoy!