Rhino Mocks 3.5 Release Candidate
Well, after a much longer beta period, and getting some very valuable input, Rhino Mocks 3.5 is out in Release Candidate. I am putting this out as RC, but I am pretty sure that those bits would be the RTM version as well.
The only major task left is to start documenting the changes. The move to 3.5 has made a lot changes in approach that I recommend to use (note that the API is compatible with 3.4).
I would like to thank Jordan Terrell, David Tchepak, Stefan Steinegger, Jason Meckley, Scott Brady, Ernst Naezer, Roelof Blom and Aaron Jensen for helping me get this out the door.
The changes (from 3.4) are:
- Assert Act Arrange syntax, of course.
- Better handling of exception in raising events from mock objects
- Fixing an issue with mock objects that expose methods with output parameter of type System.IntPtr.
- Allowing to return to record mode without losing expectations.
- Inline constraints:
[Test] public void WhenUserForgetPasswordWillSendNotification_WithConstraints() { var userRepository = MockRepository.GenerateStub<IUserRepository>(); var notificationSender = MockRepository.GenerateStub<INotificationSender>(); userRepository.Stub(x => x.GetUserById(5)).Return(new User { Id = 5, Name = "ayende" }); new LoginController(userRepository, notificationSender).ForgotMyPassword(5); notificationSender.AssertWasCalled(x => x.Send(Arg.Text.StartsWith("Changed") )); }
- If you don't know what this means, it means that you can now mock interfaces that C++/CLI generates under some conditions (mixing native types with CLR types). This is probably the longest standing bug in Rhino Mocks.
eventHolder.Raise(stub => stub.Blah += null, this, EventArgs.Empty);
There are a lot of goodies in this release.
I am starting to create the documentation for this release here. This is a wiki, any help would be appreciated.
You can get the new version, for both 3.5 and 2.0 from the download page.
Comments
Great job! And thanks to all the contributors too.
We'll probably start using this right away.
If I go to the wiki (http://www.ayende.com/Wiki/Register.aspx) and try to create a new user login, whatever I type as a password it says "invalid password" and shows a red icon, but there's no indication what a 'Valid' password is.
The password is at least 7 characters
Awesome! Talk about great timing, given our emails of the last 24 hours! ;)
I'm very much looking forward to giving this a go with the team this week!
Hi Oren,
I noticed the RC is exposing some of the Castle.Core classes publicly. I'm not sure if this was intended - but causes an ambiguous reference error if you have an assembly that references both Castle.Core.dll and Rhino.Mocks.dll...
Any chance you can re-internalise them?
Yes, they would be internal
Comment preview