【发布时间】:2012-01-24 09:01:21
【问题描述】:
我仍在学习 Rhino 模拟,并对此有疑问。例如 - 我在模拟界面中有一个函数:
public interface ISomeObject
{
string Name {get; set;}
int Id {get;set;}
}
// This class will be returned as and answer to function call
public class AnswerObject
{
public bool IfError {get;set;}
}
// Main interface
public interface IClass
{
AnswerObject FunctionGetCollection(ref ICollection <ISomeObject> ListOfInternalObjects, ref int Number);
}
如您所见,函数“FunctionGetCollection”将接收作为“ref”传递的 2 个参数并返回另一个类作为“function-answer”。你能帮我存根这个函数吗?我需要能够使用:
- 函数将返回不同的集合(基于代码而不是参数)
- 函数将返回不同的 AnswerObject
【问题讨论】:
标签: c# rhino-mocks