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
- type
- Type: SystemString
String representation of Type - methodName
- Type: SystemString
String representation of Method
Return Value
Type: Int32Number of times the method has been called
Remarks
Examples
[Test] public void Test() { // init collecting on MockManager.Init(true); TestedClass t = new TestedClass(); t.doSomething(); t.doSomething(); t.doSomething(); Assert.AreEqual(3,MockManager.CalledCounter("TestClassLibrary.TestedClass","doSomething")); }
![]() |
---|
Calls from Types of the System.* namespace will not be collected until the type is mocked |
See Also