Ayende @ Rahien

Unnatural acts on source code

Rhino Mocks 3.2

This is mostly a maintenance release, to get the code out the door before it eats me. As you can see, there has been quite a few changes, most of them are bug fixes, but there are some new features.

A side note, I have had 34,034 downloads for the 3.1 version, Wow!

As usual, you can get it here.

Features:

  • Applied patch from Robert Angres, adding TraceWriterExpectationLogger
  • Applying patch for With.Mocks fluent interface from Tobias Grimm
  • Applied patch from Tobias Grimm that adds support for: With.Mocks(...).ExpectInSameOrder(...).Verify()
  • Adding a way to have more granularity on what BackToRecord will revert.
  • EventRaiser.Create()
  • Adding EventRaiser.Raise(sender, e) overload, for better intelli sense support.
  • Playback disposable will check for an exception and avoid the VerifyAll if there was one.

Bugs

  • Disable calling LastCall.Constraints more than once.
  • Better error message on LastCall, will point the user to the option of non virtual method call being made.
  • Fixed bug: stub with properties that return value types must have the value set before it can be get.
  • Fixing mocking generic methods with generic class constraint
  • Fixing mocking of internal properties of internal types
  • Applied patch from Josh Flanagan, do not consider the value of an out parameter when creating default constraint.
  • Passing a null to a params parameter would throw null reference exception.
  • Fixing a bug where Stub would not stub the base class / interface properties.
  • Should throw exception on verify if Repeat.Never was called.
  • Better error messages when calling EventRaiser.Raise() incorrectly.
  • Applying Adam Tybor patch, removing warning from the build and setting DelegateTargetInterfaceCreator creation assembly to be a signed one.
  • Fixing an issue with stubbing generic types.
  • Fixing minor issues with EventRaiser error handling
  • Better error message when using specifying a return value and setting Repeat.Never

Comments

Ben Scheirman
08/14/2007 03:30 PM by
Ben Scheirman

Nice job!

Would you recommend the With.Mocks fluent interface over the using(_mocks.Record())

{ .. }

using(_mocks.PlayBack())

{...}

???

There was an issue with it swallowing exceptions (or wrapping) that made it difficult to see why the expected calls failed...

I like the above syntax, but I am considering using the new syntax.

Brent
08/14/2007 03:58 PM by
Brent

Thank you Ayende!

Ayende Rahien
08/14/2007 05:30 PM by
Ayende Rahien

We added a check to verify so that it would not catch exception, so that one is safe again

Mike
08/15/2007 06:40 PM by
Mike

Congratulations on 34,034 downloads. Rhino Mocks is featured in the September 2007 edition of MSDN magazine. http://msdn.microsoft.com/msdnmag/issues/07/09/MockTesting/default.aspx#S4

tobsen
08/16/2007 01:36 PM by
tobsen

I kicked your release (www.dotnetkicks.com) so even people new to Rhino.Mocks will be aware of the new version. Maybe you should consider adding dotnetkicks to your (great) posts?

Tobias
08/21/2007 11:30 AM by
Tobias

I've put together a small comparison of the different Rhino Mocks syntaxes:

http://e-tobi.net/blog/articles/2007/08/21/different-ways-of-riding-a-rhino

Comments have been closed on this topic.