参数约束

时间:2009-05-14 07:44:41

标签: unit-testing rhino-mocks constraints

我使用的是Rhino Mocks框架。 我引用了Rhinomocks dll,一切正常...... 但是当我试图使用LastCall.Constraints(Is.Anything()) 它说:错误当前上下文中不存在名称“Is” Text和List约束也是如此。 任何帮助??

2 个答案:

答案 0 :(得分:3)

你是

吗?
using Rhino.Mocks.Constraints;

'Isstra'类在'Constraints'命名空间中定义,必须明确引用才能使用该类。

答案 1 :(得分:0)

我不熟悉RhinoMocks框架,但我找到了一些可能对您有帮助的代码。这是使用它的a file from the SVN of castleproject.org,您可能希望将您的方法与他们的方法进行比较。

相关问题