- 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
- 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
- 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.
Version 3.0BREAKING CHANGES:
- Moved all the constraints to Rhino.Mocks.Constraints namespace. This was done to avoic conflicts with NUnit and MbUnit's new assert syntax.
- 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.
Bug fixes (from previous 3.0 Beta):
- 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).
- 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.
- Fixed an issue where Message() would not always be displayed to the user when an expectation violation occurs.
- Added extensibility hooks to Rhino mocks, examples of which can be found:
- 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.
- 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.
- 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
- 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.
- 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.
- Applying previous fix to underordered as well as ordered recorder
- 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
- Mutli Mcoks - The ability to mock more than one interface at a time
- Vitrual method calls from constrcutors
- Support for raising events
- Improved support for remoting mocks
- Fixed a bug with regard to interfaces with the same name on different namespaces.
- Bug Fix Relase - StackOverFlow when overriding Equals
- Fixing an issue with duplicate generation of mocked generic type
- Fixing an issue with duplicate generation of mocked types
- Huge Memory Requirements Improvements
- BackToRecord() fixes on Dynamic / Partial mocks
- 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.
- Better supports for methods with arrays of value types
- allow to mock internal classes. Edit
- Partial Mocks
- Support for Out & Ref parameters
- Mocking Delegates
- 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
- Disable mocking for specific methods in the object
- Mocking abstract classes
- Generic methods support, to support DRY
- Dynamic mocks - mock objects that verify only what they are told to verify.
- Events handling
- Explicit syntax for specifying method's options.
+ SetupResult.For() ...
- 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.)
- Converted EasyMock.Net to a .Net style API