什么是犀牛制品重复? [英] What is Rhino Mocks Repeat?

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

问题描述

什么是犀牛制品重复

Repeat.Any();

Repeat.Once();



这是什么意思,以及它如何工作的?

What does it mean and how it works ?

推荐答案

这是通过期望构建一个流畅声明的一部分。作为用于它的意思,这意味着先前的甚至预期发生很多次。

It's used with the Expect construct as part of a fluent declaration. As for what it means, it means that the previous even is expected to occur that many times.

例如, Expect.Call(的someMethod( ))。Repeat.Twice()表示,的someMethod()将被称为正好两次。

For instance, Expect.Call(someMethod()).Repeat.Twice() says that someMethod() will be called exactly two times.

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

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