EditVersion 3.0.5
New features:
- A old/new syntax that is more explicit about the record replay model, courtesy of James Kovacs:
- Applied patch from Ross Beehler, adding more smarts to Validate.ArgsEqual
Bug fixes:
- Fixing an issue where virtual method calls in partial mocks ctors were not called.
- Fixing an issue with mocking objects with protected internal abstract methods
EditVersion 3.0.1
- Trying to mock COM interfaces (specifically, IE interfaces) throws an exception.
- Trying to pass a Do() delegate for a generic method call where some of the incoming parameters are generic parameters throws an exception.
EditVersion 3.0
BREAKING CHANGES:- Moved all the constraints to Rhino.Mocks.Constraints namespace. This was done to avoic conflicts with NUnit and MbUnit's new assert syntax.
New features:- Generic Methods (at last!)
- Support arrays of value types as out parameters
- Support non-CLS Compliant value types such as UInt64
- Better error messages when using generic delegate methods on generic types
- Generally faster
- Using Dynamic Proxy 2 - better performance, better code-base, full support for wierd generic scenarios.
- Text.* constraints can now be used to evaluate non strings as well, by calling the ToString() method. Useful for things such as the Criteria API in NHibernate.
Changes:- The CallOriginalMethod() was deprecated, you are now encouraged to use CallOriginalMethod(OriginalMethodOptions.NoExpectation) or CallOriginalMethod(OriginalMethodOptions.CreateExpectation) instead. The reasoning behind the change is that currently CallOriginalMethod looks like it create an expectation, but it doesn't really does it, s it is better to be explicit about the whole thing.
- The build script will interlaize almost everything no related to Rhino Mocks (Except AbstractInvocation) - prevent conflicts from users that uses both Dynamic Proxy and Rhino Mocks - i.e, me).
Bug fixes (from previous 3.0 Beta):- Fixed regression with closed generic types inheriting from open generic types that contains generic properties of the generic type, if the property is overriden
- Fixed issues with the generic method return values.
- Regression with closed generic types inheriting from open generic types that contains generic properties of the generic type, if the property is overriden
- Fixed a problem with the new semantics of CallOriginalMethod
- Fixed a problem mocking internal types that are not nested
- Fixed a misleading exception when you pass a mock object of type that override ToString() to an unexpected method.
- Fixing another issue with AbstractExpectation not checking the real return type of generic methods.
- Fixed issue with generic method call on generic type for interfaces
- Fixing an issue with BackToRecord no clearing originalMethodsToCall expectations.
- Improved support for wacky generics scenarios.
- Better support for types having non inheritable attributes that cannot be easily replicated.
- Better support for types implementing interfaces by using a base class that is located in another assembly.
EditVersion 2.9.6:
- Fixed an issue where Message() would not always be displayed to the user when an expectation violation occurs.
EditVersion 2.9.5:
- Added extensibility hooks to Rhino mocks, examples of which can be found:
- https://svn.sourceforge.net/svnroot/rhino-tools/trunk/rhino-mocks/src/Rhino.Mocks.Tests/ExtendingRhinoMocks.cs
- https://svn.sourceforge.net/svnroot/rhino-tools/trunk/rhino-mocks/src/Rhino.Mocks.Tests/ExtendingRhinoMocks2.cs
- Fixed an issue with BackToRecordAll() not reset the state of a mock in a record state
- If an exception was thrown by a mock, and Verify() was called on it, the exception will be thrown again. This helps in cases where the code catch/handle all exceptions.
Edit Version 2.9.2:
- Fixes an issue with mocking a type whose method comes from several assemblies (inheriting a type from another assembly, that is) where some of those methods are internals, and InternalsVisibleTo is only applied to one of those assemblies.
Edit Version 2.9.1:
- Added Message() to Method Options, allowing more structured way to add intent to expectations described in more details here.
- Added operator && and || overloading to constraints
- Added Is.Matching(Predicate pred) constraint
- Better error message for trying to mock a non-virtual method call.
- Fixed stupid issue with BackToRecordAll()
- Removed outdated documentation
Edit Version 2.9:
- bug fix release, to fix an issue with two recorders inside the root recorder and an unexpected method call, they would then each forwarded the replay request to the root, which would then begin from scratch, etc.
EditVersoin 2.8.8:
- multiply fixes for ordering, including some really bizzare edge cases. In
- Eric Nicholson was kind enough to send a patch that fixes an issue with mocking classes that has finalizers.
EditVersion 2.8.7:
- Applying previous fix to underordered as well as ordered recorder
EditVersion 2.8.6:
- Fixing issues with nested ordering and expectations that can be called over a range of values
- Experimental With.Mock() code... http://www.ayende.com/Blog/2006/06/08/RhinoMocksExperimentalFeatureWithMocks.aspx
- BackToRecordAll()
Edit Version 2.8:
- Mutli Mcoks - The ability to mock more than one interface at a time
Edit Version 2.7.1:
- Vitrual method calls from constrcutors
Edit Version 2.7:
- Support for raising events
- Improved support for remoting mocks
- Fixed a bug with regard to interfaces with the same name on different namespaces.
Edit Version 2.6.6:
- Bug Fix Relase - StackOverFlow when overriding Equals
Edit Version 2.6.5:
Edit Version 2.6.4:
- Fixing an issue with duplicate generation of mocked generic type
Edit Version 2.6.3:
- Fixing an issue with duplicate generation of mocked types
Edit Version 2.6.2:
- Huge Memory Requirements Improvements
EditVersion 2.6.1:
- BackToRecord() fixes on Dynamic / Partial mocks
Edit Version 2.6:
- Support for methods that start with get_ & set_ that are not properties.
- Fixed BackToRecord() not cleaning up repeatable expectation (read: SetupResult).
- Added Is.TypeOf() to save some typing.
Edit Version 2.5.9:
- Better supports for methods with arrays of value types
Edit Version 2.5.6:
assembly: InternalsVisibleTo(RhinoMocks.StrongName) - allow to mock internal classes.
Edit Version 2.5.5:
- Partial Mocks
- Support for Out & Ref parameters
- Mocking Delegates
Edit Version 2.5:
- Support for bringing a mock back to record state
- Mocking internal classes in .Net 2.0
- Automatic handling of properties
- Do handler - Passing a delegate that run at method match, and can return values
Edit Version 2.4:
- Disable mocking for specific methods in the object
- Mocking abstract classes
- Generic methods support, to support DRY
EditVersion 2.3:
- Dynamic mocks - mock objects that verify only what they are told to verify.
- Events handling
EditVersion 2.2:
- Explicit syntax for specifying method's options.
+ SetupResult.For() ...
+ LastCall.Repeat
EditVersion 2.1:
EditVersion 2.0:
- Re-written from scratch using Dynamic Proxy
- Explicit record & replay model.
- Explicit LastCall model.
- Single repository for all mocks.
- Ability to specify an ordering for the methods under test.
- IDisposable implementation to make it easier to verify.
- Flexible constraints.
- Method callbacks.
- Easy extending of the framework.
- Early failing on errors.
- Mock classes as well as interfaces, and make sure that both behave exactly like they are supposed to (and not sort of like it.)
EditVersion 1.0:
- Converted EasyMock.Net to a .Net style API