October 25, 2007

Rhino Mocks 3.3 Released

Straight from Ayende, Rhino Mocks 3.3 has been released.  The peasants rejoiced.  Well, I rejoiced anyway.

New features:

  • Adding support for calling void methods using Expect.Call
  • Adding remoting proxies.
  • Made IMethodOptions generic. Allows compile time type safety on Return. 
  • Adding a PublicFieldConstraint

The biggest change for the day to day developer: you can now use Expect.Call on methods that return void.  This wasn't a big problem per-say, but it did cause a lot of confusion.  You would see code mocking a function call like this:

Expect.Call(mockObject.MyFunction()).Return(1);

Then your method returning void would look like this:

mockObject.MyMethod();

Not the most consistent API.  Now that should be fixed.  So mocking a method will now look like this:

Expect.Call(mockObject.MyMethod());

Ayende's post

Download here

Rhino mocks is on my list of source code to read as soon as I'm finished going through SubSonic.

Have you thanked Ayende today?

No comments: