标签: unit-testing testing rhino-mocks
犀牛模拟中lastcall方法的用途是什么? 你可以借助例子解释一下吗?
lastcall
答案 0 :(得分:1)
LastCall允许您对最后一次添加的呼叫执行其他操作。
Expect.Call(delegate{ mockObject.DoSomething("foo"); }).IgnoreArguments();
与
mockObject.DoSomething("foo"); LastCall.IgnoreArguments();
希望这有帮助。