Ayende @ Rahien

Hi!
My name is Oren Eini
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:

ayende@ayende.com

+972 52-548-6969

, @ Q c

Posts: 08 | Comments: 19

filter by tags archive

Rhino Mocks 3.3

time to read 2 min | 235 words

image Well, it has been a couple of months, but we have a new release of Rhino Mocks. I would like to thank Aaron Jensen, Ivan Krivyakov and Mike Winburn for contributing.

Probably the two big new features is the ability to call void methods using Expect.Call and the ability to use remoting proxies to mock classes that inherit from MarshalByRefObject. Rhino Mocks will now choose the appropriate mocking strategy based on the type you want.

Note: you cannot pass constructor arguments or create partial mocks with remoting proxies.

The change log is:

Bug Fixes: 

  • Fixing inconsistency in how Is.Equals handled ICollection instances, now it will compare them by their values, not their Equals() 
  • Fixing NASTY bug where setup result that were defined in a using(mocks.Ordered()) block were not registered properly. 

Improvments:

  • Changing error message to "are you calling a virtual (C#) / Overridable (VB) method?" - make it friendlier to VB guys. 
  • Exception for Record will not trigger a ReplayAll(), which can mask the exception. 
  • Adding a check for running on Mono to avoid calling Marshal.GetExceptionCode in that case.

New features:

  • Adding support for calling void methods using Expect.Call
  • Adding remoting proxies.
  • Made IMethodOptions generic. Allows compile time type safety on Return. 
  • Adding a PublicFieldConstraint

As usual, you can get it here


Comments

Kevin Williams

Sweet!

Love the logo. Did you do that yourself?

Chris Brandsma

Very nice, I was planning on talking about Mock objects at my next user group meeting anyway. This will help.

Ayende Rahien

Kevin, no. :-)

I can't draw a straight line with a ruler.

Romeliz did it:

http://www.ayende.com/Blog/archive/2007/07/31/New-Rhino-Mocks-Logo.aspx

MarioL

Great job! Thanks Oren and everyone else who contributed!

Haacked

The delegate thing for void methods is clever. With the new language features, that'll reduce to a lambda.

() => SomeMethod();

Bil Simser

Great! Thanks for the void method support. It bugs the crap out of me having to write extra lines to ignore the last call. This is going to reduce unnecessary code in the test codebase, which is always a good thing in my books.

Dennis Olano

Thanks a lot to the team!

Comment preview

Comments have been closed on this topic.

FUTURE POSTS

  1. Production postmortem: The case of the memory eater and high load - 3 days from now
  2. Production postmortem: The case of the lying configuration file - 4 days from now
  3. Production postmortem: The industry at large - 5 days from now
  4. The insidious cost of allocations - 6 days from now
  5. Find the bug: The concurrent memory buster - 7 days from now

And 4 more posts are pending...

There are posts all the way to Sep 10, 2015

RECENT SERIES

  1. Find the bug (5):
    20 Apr 2011 - Why do I get a Null Reference Exception?
  2. Production postmortem (10):
    14 Aug 2015 - The case of the man in the middle
  3. What is new in RavenDB 3.5 (7):
    12 Aug 2015 - Monitoring support
  4. Career planning (6):
    24 Jul 2015 - The immortal choices aren't
View all series

Syndication

Main feed Feed Stats
Comments feed   Comments Feed Stats