问题
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
回答1:
Ensure that you are referencing System.Core
来源:https://stackoverflow.com/questions/1698434/extension-methods-in-mono-2-4-and-rhinomocks-3-5