Get the number of time a moq method has been called <p>It's possible to use <code>myMock.Verify(m =&gt; m.f(It.IsAny&lt;string&gt;()), ...);</code> to assert that the method <code>f(string s)</code> has been called at least / at most / exactly n times.</p> <p>I want to do something a bit more complicated: I want to ensure that the number of calls to <code>f(string s)</code> <em>plus</em> the number of calls to <code>f(int i)</code> is equal to 3.</p> <p>Is there an lightweight way to do it with Moq?</p> <p><strong>More details</strong></p> <p>Actually I can think of a way to do it: I could setup a callback that would increment a counter when each of those methods is used. However it would require more set up in the test, which could hinder it's readability. (And it would be a shame to re-implement something that could already be implemented in moq).</p> <p>For instance a lightweight way to do it could be to be able to retrieve the exact number of call to my method, so that I could <code>Assert.AreEqual</code> on it. But I haven't been able to find a way to do it so far.</p>