Return the amount of times a method has been called
Namespace: TypeMock
Assembly: TypeMock (in TypeMock.dll) Version: 9.3.6.0 (9.3.6.0)
Syntax
Parameters
- method
- Type: SystemString
String representation of Method
Return Value
Type: Int32Number of times the method has been called
Remarks
Examples
[Test] public void Test() { Mock mock = MockManager.Mock(typeof(TestedClass)); TestedClass t = new TestedClass(); t.doSomething(); t.doSomething(); t.doSomething(); Assert.AreEqual(3,mock.GetCallCount("doSomething")); }
![]() |
---|
mock.GetCallCount("doSomething") is equivalent to MockManager.CalledCounter("TestClassLibrary.TestedClass","doSomething") See CalledCounter(String, String) |
See Also