标签:style color io os ar for 文件 art sp
_mockDAO.Stub(x => x.SomeMethod(myObject)).Constraints(Property.Value("IsSomethingICareAbout", true)
.Return("foo");
表示只有当属性IsSomethingICareAbout为True时才返回指定值 _mockDAO.Stub(dao => dao.GetRecordFromDatabase(0))
.IgnoreArguments()
.Repeat.Any()
.Do((Func<int, ImportantData>)(input => new ImportantData
{
Name = "Orignal Name",
RecordId = input
}));
标签:style color io os ar for 文件 art sp
原文地址:http://www.cnblogs.com/phenixyu/p/3965194.html