views:

213

answers:

1

I am playing around with MonoDevelop 2.0 and Mono 2.4 in Ubuntu.

I have run into problems with extension methods not being available (eg mockView.Stub(...)) in RhinoMocks 3.5 for AAA style tests. I downloaded the RhinoMocks dll from Ayende's site rather than compiled from source. My project in MonoDevelop is setup to target framework 3.5

Using the RhinoMocks c#2.0 syntax with static methods on the RhinoMocksExtensions class works. (e.g RhinoMocksExtensions.Stub(authSvc, delegate(IAuthService svc))

Should AAA syntax (and RhinoMocks in general) work with Mono 2.4 or is it likely I've not setup something correctly?

Thanks in advance

Neil

+3  A: 

Ensure that you are referencing System.Core

Ankit
Extension methods aren't related to System.Core, are they?
Dykam
They are. Some attributes from this assembly are needed.
skolima
Thanks that did the trick as far as the compiler is concerned.Intellisense in MonoDevelop 2.0 doesn't pick up the extension methods but I can live with that - hopefully it'll be sorted in the upcoming 2.2 release.
Neil