问题
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