chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
Welcome to Typemock Community! Here you can ask and receive answers from other community members. If you liked or disliked an answer or thread: react with an up- or downvote.
0 votes
Hello,

I'm trying to run the evaluation copy of Isolator and am getting a TypeMockException with the callstack below at the time I'm creating the very first fake object. I've checked the Typemock menu in VS2010 IDE and I see the "Disable Typemock Isolator" option which makes me believe that I have it enabled.

Can anyone please tell how should I go about fixing this issue?

Thank you, eugen

ex.a()
ex.c()
TypeMock.MockManager.Init(Boolean collectAllCalls)
TypeMock.MockManager.Init()
TypeMock.MockManager.g(Type A_0)
TypeMock.MockManager.Mock(Type type, Constructor mockConstructors)
TypeMock.MockManager.a(Type A_0, Constructor A_1, Object[] A_2, Boolean A_3)
TypeMock.MockManager.MockObject(Type type, Constructor mockConstructors, Object[] args)
TypeMock.MockManager.MockObject[TMockedType](Constructor mockConstructors)
TypeMock.ArrangeActAssert.InstanceFaker`1.e()
TypeMock.ArrangeActAssert.InstanceFaker`1.d()
ek.CreateFakeInstance[T](Members behavior, Constructor constructorFlag, Constructor baseConstructorFlag, Type baseType, Object[] ctorArgs)
ek.Instance[T](Members behavior)
Service.UserSession.Tests.UserSessionServiceTests.MyTestInitialize() in D:Workspace 3APFAPFAPF ProjectTestsService.UserSession.TestsUserSessionServiceTests.cs: line 115
asked by eugen_nw (1.2k points)

8 Answers

0 votes
Hi,

Can you please tell me how are you running the test? (What is the test runner? Are you running inside visual studio or from the command line?)
Also are running on 32 or 64 bit OS?
answered by ohad (35.4k points)
0 votes
Thanks ohad for having looked into this!

I'm running the tests within VS2010. I'm adding the Typemock functionality to VS test projects. This is on 64 bit Windows 7.

Could it have anything to do with the fact that I have "TestDriven.Net 3.0 Personal" and "TestDriven.Net Reflector" installed?

eugen_nw
answered by eugen_nw (1.2k points)
0 votes
Hi,

I don't think that TestDriven is the cause, actually we have good integration with its runner :)
Do you get the same exception when you run the tests with TestDriven and with MSTest runner?
The difference between TD.NET and mstest is that mstest runs only in 32bit while TD.NET checks the build configuration (AnyCPU, x86 x64) of the test assembly and run the the process in the correct context.
answered by ohad (35.4k points)
0 votes
I'm not exactly using TestDriven, I've installed it in a TDD class. Which means that the original issue is not fixed.
answered by eugen_nw (1.2k points)
0 votes
What exactly does the exception test say? Would you mind posting it?

Thanks.
answered by igal (5.7k points)
0 votes
Please find the exception below. Please also note that there is another new post in this forum on this very topic.

Thank you, eugen


TypeMock.TypeMockException occurred
Message=
*** Typemock Isolator is not currently enabled.
To enable do one of the following:

* To run Typemock Isolator as part of an automated process you can:
- run tests via TMockRunner.exe command line tool
- use 'TypeMockStart' tasks for MSBuild or NAnt

* To work with Typemock Isolator inside Visual Studio.NET:
set Tools->Enable Typemock Isolator from within Visual Studio

For more information consult the documentation (see 'Running' topic)
Source=TypeMock
StackTrace:
at ex.a()
InnerException:
answered by eugen_nw (1.2k points)
0 votes
I had the same problem from time to time. This is caused by TypeMock not being able to work with "Trace and Test Impact" test settings. Your active test settings are set thru your .vsmdi file. BTW, you shouldn't be checking any .vsmdi file into source control - since it should really just be local to the user's machine. We use local.testsettings.

In any case, I was able to solve the problem by going to the "Test" menu in VisualStudio (2010) and choose "Select Active Test Settings". Make sure that "Trace and Test Impact" test settings is NOT selected.
answered by dblack (8.4k points)
0 votes
Thanks for answering this Dave :D
answered by alex (17k points)
...