Rhino Mocks 2.2
Okay, after some more talks with Geert, I made some additional changes to Rhino Mocks' syntax.
First things first, no code using Rhino Mocks will break as a result of the changes. But new code should be easier to write & read because of those changes.
The idea is simply to make it easier to write expectations, so without further ado, here is the new syntax:
IProjectView projectView = (IProjectView)mocks.CreateMock(typeof(IProjectView));
SetupResult.For(projectView.Title).Return("Test Project");//New in Rhino Mocks 2.2
LastCall.Repeat.Twice();//new - Rhino Mocks 2.2
projectView.ShowError(null);
LastCall.IgnoreArguments();//new - Rhino Mocks 2.2
Expect.Call(projectView.HasChanges).Return(true);//Since Rhino Mocks 2.1 (meaning yesterday :-))
As usual for major releases, there is a Code Project Article. I've updated the documentation and the download page.
Happy mocking.
Comments
Comment preview