RhinoMocks 中的 LastCall 是什么? [英] What is LastCall for in RhinoMocks?

查看:36
本文介绍了RhinoMocks 中的 LastCall 是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

rhino mock 中 lastcall 方法有什么用?能否举例说明一下?

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

推荐答案

LastCall 允许您在上次添加的呼叫之外执行其他操作.

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

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

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

希望这会有所帮助.

这篇关于RhinoMocks 中的 LastCall 是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆