What is Rhino Mocks Repeat?

Yoann. B picture Yoann. B · Jan 21, 2009 · Viewed 9.2k times · Source

What is Rhino Mocks Repeat ?

Repeat.Any();

Repeat.Once();

What does it mean and how it works ?

Answer

Matthew Brubaker picture Matthew Brubaker · Jan 21, 2009

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.