What is Rhino Mocks Repeat?

2019-02-16 07:30发布

What is Rhino Mocks Repeat ?

Repeat.Any();

Repeat.Once();

What does it mean and how it works ?

1条回答
混吃等死
2楼-- · 2019-02-16 08:20

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

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

查看更多
登录 后发表回答