Hi Alex,
I installed TypemockIsolatorSuite7.4.2.86.msi and encountered these issues in VS2013.
These lines of code were run with Debug.StartWithoutDebugging in a blank console application in VS2013 linked to TypeMock.dll and Typemock.ArrangeActAssert.dll. Ran without Typemock Smart Runner installed.
This line:
Isolate.WhenCalled(() => DateTime.Now).WillReturn(new DateTime(1906, 1, 1));
First led to this exception:
Unhandled Exception: TypeMock.TypeMockException:
*** No method calls found in recording block. Please check:
* Are you trying to fake a field instead of a property?
* Are you are trying to fake an unsupported mscorlib type? See supported types here:
http://www.typ
emock.com/mscorlib-types
at gs.a(c5 A_0, Boolean A_1)
at bk.a(Boolean A_0)
at dw.b(Boolean A_0)
at i4.b(Boolean A_0)
at i4.a(Object A_0, Boolean A_1, Func`1 A_2, Action A_3, Action A_4, Action A_5, Boolean A_6)
at i4.e(Object A_0)
at TypeMock.ArrangeActAssert.ExpectationEngine`1.a(TResult A_0)
at TypemockNamespace.Program.Main(String[] args) in c:Users
justiceDocumentsVisual Studio 201
3ProjectsTypemockTypemockProgram.cs:line 14
Then I saved the file and reran the program then this different exception was thrown:
Unhandled Exception: TypeMock.TypeMockException:
*** Typemock Isolator is currently disabled. Enable using the following:
* Within Visual Studio:
- Use Typemock Smart Runner
- For other runners, Choose Typemock Menu and click "Enable mocking for 3rd party runners"
* 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
For more information consult the documentation (see 'Running Unit Tests in an Automated Build')
at TypeMock.InterceptorsWrapper.VerifyInterceptorsIsLoaded()
at gx.e()
at TypeMock.MockManager.Init(Boolean collectAllCalls)
at TypeMock.MockManager.Init()
at TypeMock.ArrangeActAssert.Isolate.CreateExpectationEngine[T](Delegate del)
at TypeMock.ArrangeActAssert.Isolate.WhenCalled[T](Func`1 func)
at TypemockNamespace.Program.Main(String[] args) in c:Users
justiceDocumentsVisual Studio 201
3ProjectsTypemockTypemockProgram.cs:line 18
This is with "Enable mocking for 3rd party runners" checked.
This is also with Essential as the license applied. I haven't used Isolator in a while but if I remember correctly, DateTime.Now used to fakable to return other DateTimes.
This line:
Isolate.Fake.StaticMethods(typeof(StaticClass));
Led to this exception, despite "Enable mocking for 3rd party runners" being checked:
Unhandled Exception: TypeMock.TypeMockException:
*** Typemock Isolator is currently disabled. Enable using the following:
* Within Visual Studio:
- Use Typemock Smart Runner
- For other runners, Choose Typemock Menu and click "Enable mocking for 3rd party runners"
* 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
For more information consult the documentation (see 'Running Unit Tests in an Automated Build')
at TypeMock.InterceptorsWrapper.VerifyInterceptorsIsLoaded()
at gx.e()
at TypeMock.MockManager.Init(Boolean collectAllCalls)
at g8.a(Type A_0, Members A_1)
at g8.c(Type A_0)
at TypemockNamespace.Program.Main(String[] args) in c:Users
justiceDocumentsVisual Studio 201
3ProjectsTypemockTypemockProgram.cs:line 18
When I then unchecked "Enable mocking for 3rd party runners" and then rechecked it, the above exception did not happen any more.
Two bonus issues:
Menu option "Try Full Version..." appears under the "TYPEMOCK" menu despite Essential being the license applied.
During the Custom Setup part of installation, the description of "Typemock Smart Runner" reads "plugin that automagically collects code..."
Code...!