Rhino Mocks 3.0 Released!
I gave it a few weeks outside, and quite a few people downloaded and tried it, so I am feeling good about it. I had a surprised that kept me from release the 3.0 for a while, but I'll talk about it later.
The binaries and code are in their usual place, here.
BREAKING CHANGES:
- Moved all the constraints to Rhino.Mocks.Constraints namespace. This was done to avoid 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 weird 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, it is better to be explicit about the whole thing.
- The build script will internalize 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.
Comments
Congrats Ayende! Can't wait to start using it!
Rhino Mocks 3.0 Released
Just out of interest why is it called "Rhino" Mocks? Shot.
Why is it called Rhino Mocks?
Take a look at the top of this page, and check the banner.
Basically, I needed a name, and I like Rhinos.
Congrats, dude. Good job.
Congrats Ayende! it is a big!
Great shot Ayende, I can wait to upgrade all my project with this new version :D.
Gian Maria
Ayende anuncia o release da versão 3.0 de seu framework de Mock objects. Para quem não quem ainda sabe
Comment preview