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
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.
Thank you Ayende!
We added a check to verify so that it would not catch exception, so that one is safe again
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
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?
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
Comment preview