Rhino Mocks

It sounds like Rhino mocks is the way to do mocking… I just watched Ayende’s intro to Rhino Mocks (Episode 1) and mocking seems like the way to go… and I have some hope that I can use it on my current project! At a very high level, I get that mocking is the way to properly unit test.  I’m still working out the specifics of how one actually sets things up to be mockable.  It looks like a key is to interface things like crazy.  Luckily, I’ve got resharper (well, for the next 20 days or so until I’ve got to beg or buy a license) , so throwing interfaces on some key classes to start is doable.  I’d really like to get some real unit tests written.  At the moment I’ve got some integration tests for a complex portion of my project-which were a godsend, I don’t think we ever would have made it to launch without a way to test that didn’t involve people spending 2 hours creating each scenario in the UI.   And those were a lifesaver, but they were complicated and a bit finicky since they involved a db and a bunch of webservice calls, and because of those same things, were also slow as heck.

Tags:

Leave a Reply

This blog is kept spam free by WP-SpamFree.