I’ve been a user MOQ to mock objects for my unit testing over the years. I recently started on a project that is using Rhino Mocks (for certain layers, but that’s another topic entirely! haha).
I was able to get a bunch of simple tests done, but once I got to more advanced tests and started needing to have my “Expect” setups (and “AssertWasCalled” verification) to check what parameters were passed I ran into slight problems. I started looking online for how Rhino Mocks did it. I did a search and the first link I found (http://hibernatingrhinos.com/Oss/rhino-mocks/learn) was woefully light.
I did some more searching and found the following:
Which provided some good examples and links to other posts discussing Stub/Mock and other features. But one link was to another post by the same author about a discussion he had with a coworker about “VerifyAll” vs “AssertWasCalled” and that lead me to find the wiki for Rhino Mocks. And one section there was most of what I was looking for, how to check values on parameters to methods you setup for the test.
I had not seen the this wiki in my search results. Wikis are not usually in my searching, so this post is mainly for me for future reference. And maybe someone will find this post someday and it will lead them to the wiki faster. At least that’s my hope.