Hi,
First I am sorry that it took us soo long to answer, there must be a time difference between our locations.
You have found a bug in the documentation :oops:. By default, TypeMock collects call statistics, only for mocked types.
To enable collecting calls for all types, do one of the following:
:arrow: 1.
MockManager.Init(true)
or
:arrow: 2.
MockManager.CollectAllCalls = true;
so the code will look like this: :idea:
Notice the Init statement
using MbUnit.Core.Framework;
using MbUnit.Framework;
using TypeMock;
namespace MCH.Fixtures
{
[TestFixture]
public class Class2
{
[Test]
public void Test()
{
MockManager.Init(true);
TestedClass t = new TestedClass();
t.doSomething();
t.doSomething();
t.doSomething();
Assert.AreEqual(3,MockManager.CalledCounter("MCH.Fixtures.TestedClass","doSomething"));
}
}
public class TestedClass
{
public void doSomething()
{
}
}
}
We have fixed the documentation and it will be contained in our next release. Thank you for pointing this out to us