Extension methods in Mono 2.4 and RhinoMocks 3.5

一笑奈何 提交于 2019-12-10 11:04:24

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!