Ayende @ Rahien
Technology, life, .Net and all the rest...

Google Ads:

Projects News

Rhino Mocks 3.4 Released

Well, it is about that time again, I got enough changes to make a release worthwhile. It has been almost five months, and we got a whole bunch of stuff going on, including a lot of stuff from contributors. (Take that, one man project :-) ).

As usual, you can get it here and the source is available here.

It is interesting to note that a lot of people have stuck with Rhino Mocks 3.1, I guess that there is really no need to upgrade, if you get what you want...

Features, more features, glorious features!

  • Added CreateMockWithRemoting and DynamicMockWithRemoting to work around BCL bug when overriding a generic method with generic constraint.
    This is useful when you want to force Rhino Mocks to use Remoting proxies (usually it just guess and you don't deal with this). That is needed because at certain cases ( generic methods with generic constraints ) there is a bug in Reflection Emit that generate invalid code.
  • Mike Nichols  has added List.ContainsAll() constraint
  • Shawn Neal added the DoNotExpect syntax, which is clearer the Expect.Call().Repeat.Never(), it is certainly shorter.
  • Added trace writer with stack trace, should make it easier to track down strange mocking behavior. Now you can just enable logging and see all the method calls that are being made.
  • Guido van Loon supplied the Property.AllPropertiesMatch constraints
  • Making sure that recorders that wrap recorders will be merged if they contain only one element. Again, this is something that you are not supposed to understand unless you went deep into the code. Suffice to say that the behavior is easier to understand now.

Bugs, annoying bugs, stupid bugs!

  • Fixing issue with empty recorders nested in recorders that has expectations. If you don't get that, then rest assure, neither do I.
  • Demid Sukhovsky  fixed Rhino Mocks support for Out/Ref values using remoting proxies.
  • Fixing null reference exception when stubbing a class with protected setter.
  • Aaron Jensen fixed the validation message when you expect a method that accept a mock object as a parameter.
  • Aaron Jensen also fixed a bunch of my typos.
  • Steven Rockarts fixed a bunch more of my typos.
  • Fixed an issue with methods returning non primitive value types, such as UInt32
18/02/2008 09:50:22 Ayende Rahien Rhino Mocks

Hibernating Rhinos - Episode #2 - Select * From MonoRail.Customers

I have just finished putting together the second episode of Hibernating Rhinos. This one tooks several days and a lot of effort to produce. The download page is here, where you can also download the first episode, talking about Rhino Mocks.

The screencast is basically taking implementing similar functionality in both Web Forms and MonoRail, while I talk about the differences between the two approaches. I spent quite a bit of time explaining most of what I do when I am writing MonoRail code, so I hope it would be clear. This episode is not meant to be an introduction to MonoRail, it is merely a show & tell episode.

I am also afraid that I fell into the common trap of Web Froms vs. MonoRail comparision, and I focused quite a bit of my time on the UI layer, instead of focusing more on the controllers side of things, which is more important.

  • The overall length: 1:14:32
  • Download size: 60Mb
  • The big sigh at the beginning? That was the fourth time that I recorded this episode!
  • I am showing code from 09:25 onward.
  • Fun part that you shouldn’t miss:
    It should fails... It doesn't fails... It should fails... It doesn't fails...
  • From 05:10 to 08:00  - Web Froms Rant (come to think about it, there are a lot of those J )

Am I talking too fast? Am I making any sense?

Errata: in talking about the view engines, there is a section that might looks like I am taking credit for building Boo, just to clarify, I am an avid user of Boo, but I can't claim any credit for it. What I meant was that I built Brail, which uses Boo.

08/04/2007 22:48:39 Ayende Rahien Brail

NQA 1.2.3: Opps, My Bad

I package it without including the app.config, which means that the application fails when you start it up.

Please try downloading it again.

17/01/2007 00:11:31 NHibernate Query Analyzer

Rhino Mocks 2.9.6 Released

Hi, over a month without a release for Rhino Mocks is a Big Thing, I think :-)

Anyway, this is a fix to a problem with the documentation message, which only work on the default expectation (because I was lazy when I wrote this?). The basic issue was that this didn't give the correct message:

IAppLock mockAppLock = this.MockFactory.CreateMock<IAppLock>();
//rig up Dispose() method
mockAppLock.Dispose();
LastCall 
   .On(mockAppLock)
   .IgnoreArguments()
   .Message("IAppLock should be disposed.");
this.MockFactory.VerifyAll()

Now it will report to you both the fact that you didn't call Dispose, as well as why you should have called dispose, which is a lot more interesting, IMO.

As usual, source and binaries are here.

07/12/2006 18:37:40 Ayende Rahien Rhino Commons