I've been looking around for some decent information on using Rhino Mocks 3.5+ with the AAA syntax. I find a lot of blogs that have a mix of things from the old and new which seem to make it more difficult to figure out how to use it.
Would would be great would be if there were a Rhino Mocks AAA Cheat Sheet like was done for an earlier version. Is it required that you know everything about the older versions of Rhino to actually use the newer version? I'm sure if I were an expert that I would love all the capabilities in Rhino, but for now I'm just swimming in information. Any pointers or good links would be totally appreciated!
I assume that you're familiar with official documentation, which is quite good in my opinion. My suggestion is to try to use Rhino, and when you encounter some more specific problem search for solution wither on SO or somewhere else. I don't think that there is a comprehensive cheat sheet for Rhino mocks. I guess you'll have more luck asking "How can I do this and that using Rhino Mocks"
Edit: Well, you don't need to use Record/Playback when targeting AAA. There are three steps involved in AAA:
.
Act, which stands for executing the tests
And Assert, which stands for veryfing the results
.
Perhaps the above examples aren't the best, but might get you into right direction.
First make sure you know what you mean for each A in AAA. You may know but I'll include my working definitions for completeness of the answer:
I like to put comments in my test code to remind me to think about each of those things. An example may help clarify: Suppose I have a service layer class which uses two provider layer classes, one from an "old" system and one from a "new" system; I am testing that the method which copies old things to the new system calls the "CreateThing" method one time for each old thing found.
I have written a Rhino Mocks Arrange / Act / Assert (AAA) Syntax Quick Reference. It contains condensed information about this syntax style collected from Ayende's web site and several other blogs.
You'd probably want to start at Ayende's original post on AAA, and than take a look at Ben Hall's nice blog post about AAA. Than you could use all the complete references mentioned in other answers...