I am having some problems with my tests (using Nant/TMockrunner 3.0.3.0). First, I have quite a few legacy tests that don't use TypeMock. I would rather not change these.
On other tests I am using TypeMock to mock some static methods of objects. In the older tests, these are static methods of real constructed objects and in the new tests they are mocked objects.
I am having trouble telling the MockManager to stop mocking these objects. In your examples, you typically call MockManager.Init() in the set up and then MockManager.Verify() in the tear down. If I understand correctly Verify() does not disactivate the Mocking of objects, Init() resets the mocks. I have tried calling MockManager.Init() in the tear down, but something seems to be breaking because I am getting null pointer exceptions when on tests when I am not useing mocked objects (but where other tests in the same build use TypeMock) When I disactivbate my tests that use TypeMock the other tests all pass.
What is the best (or the surest) way to dispose or otherwise disactivate all object mocking (at the end of a test)?
Thanks in advance for any help.
d.
ps. I don't think this is a bug, I think it is just a product of the rather complex build process that we are running.