All my test class derived from a class called FrameworkTestBase.
It worked fine until I moved my MockManager.Init() into the test initialise from the individual tests.
Now I get a null object exception from this code MockManager.Init():
[TestClass()]
public class FrameworkTestBase : TestCommonBase
{
[TestInitialize()]
public void MyTestInitialize()
{
try
{
MockManager.Init();
... Some more code
}
catch (Exception e)
{
... Some error handling
throw;
}
}
}
The stacktrace reads:
" at q.f()
at TypeMock.MockManager.Init(Boolean collectAllCalls)
at TypeMock.MockManager.Init()
at Company.Test.Harness.FrameworkTestBase.MyTestInitialize() in C:\Projects\Company\Test\Harness\FrameworkTestBase.cs:line 52"
Any idea why this would happen?