Rhino Mocks

I’ve been playing about with Rhino Mocks trying to figure out if I want to use it.  It’s definitely worth looking at for Db stuff but for my non database application it’s still a bit uncertain.

It’s worth reading Ben Hall’s introduction to Rhino Mocks if you are thinking of using it.   It explains the limitations of it best.  The one that I wish I’d really paid attention to was the bit about only being able to mock virtual methods.  If you ignore that and try to mock a non virtual method you get a “Invalid call, the last call has been used or no call has been made (make sure that you are calling a virtual (C#) / Overridable (VB) method).”. Stupidly I got hung up on the first part of the message and didn’t notice the answer in the second half.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s