Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
什么是犀牛模拟重复?
Repeat.Any(); Repeat.Once();
它是什么意思以及它是如何工作的?
它与Expect构造一起用作流利声明的一部分。至于它是什么意思:它意味着之前的事件预计会发生那么多次。
Expect
例如:Expect.Call(someMethod()).Repeat.Twice()说那someMethod()将被准确地调用两次。
Expect.Call(someMethod()).Repeat.Twice()
someMethod()