I'm running TypeMock 3.7.1 - in what I'm hoping is enterprise demo mode.
I try to do this:
MockManager.Init ();
Mock fileMock = MockManager.Mock(typeof(File));
I get this error:
TestCase 'ClassLibraryUnitTests.Class1Tester.GetFileDataMethod_Positive'
failed: TypeMock.TypeMockException :
*** Cannot mock types from mscorlib assembly.
<stacktrace>
Now my understanding is that this is now supported in the enterprise version of 3.7.1. Is this true? Have I somehow not installed the demo license correctly? Is there a good way to tell?
I can actually find an example in the documentation where this kind of object is mocked:
https://www.typemock.com/Docs/UserGuide/ ... ments.html
That article shows this code:
MockManager.Init ();
Mock theMock = MockManager.Mock(typeof(FileStream));
Yet, when I try executing this code in my test, I get the same "Cannot mock types from mscorlib assembly." as above. This leaves me perplexed, since its straight from the docs.
Can anyone enlighten me on what TypeMock's capabilities are in this regard? It seems like an excellent tool particularly when you're adding tests to a large existing code base.
Thanks,
andy lash