What is LastCall for in RhinoMocks?

大憨熊 提交于 2019-12-26 05:19:46

问题


What is the use of lastcall method in rhino mock? Can you please explain with the help of example?


回答1:


LastCall allows you to do something additional to the last call that was added.

Expect.Call(delegate{ mockObject.DoSomething("foo"); }).IgnoreArguments(); 

is that same as

mockObject.DoSomething("foo"); 
LastCall.IgnoreArguments(); 

Hope this helps.



来源:https://stackoverflow.com/questions/5789662/what-is-lastcall-for-in-rhinomocks

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