Rhino Mocks 3.1 - Released!
At least this time I managed to last a week. New release with a bunch of new features:
- Stubs are obvious in, here is my previous post about them and the documentation
- Added logging support for Rhino Mocks - this means that you can now get clearer information about what is going on, you can configure the logging using:
RhinoMocks.Logger = new TextWriterExpectationLogger (Console.Out);Right now the implementation would simply write the method calls, but it is possible to generate "Expect.Call" syntax from the information (patches are welcome :-) ). - Applied patch from Stefan Podskubka - adding List.Count and List.Element constraints.
Expect
.Call(query.SetParaemters()).Constraints(List.Count(Is.GreaterThan(5)))And:
Expect
.Call(query.SetParaemters()).Constraints(List.Element(2, Is.Equal(null))) - Fixed an issue where the wrong count of expected calls is reported.
You can get the code and the binaries here.
Comments
Nicely done!
Yeah, thanks for the new release.
And like I told Ayende when I sent him my patch for the List.Count and List.Element constraints, I think they are quite useful when mocking method calls with variable parameter lists. At least that's what I mainly use them for.
Comment preview