Release Notes

Version 3.5

Following are the release notes for version 3.5. For obsolete APIs, see below.

Hide C# Code
Hide Visual Basic Code


Natural Mocks™

Typemock Isolator now supports the innovative Natural Mocks™ way of defining expectations.

Using Natural Mocks™ it is now much simpler to define and create tests that require isolating other parts of the code. Although Natural Mocks™ is easier, it does not cover all the scenarios, and the normal Typemock Isolator way is required. The two way are compatible and can be used together.

using (RecordExpectations recorder = RecorderManager.StartRecording())
{
   // CAUTION: ALL calls here are mocked!!!
   Logger.Log(Logger.NORMAL,null); // This is mocked 
}

 


Natural Mocks™ Autochaining

Enterprise Edition Only (see Typemock Isolator Editions)
Chaining Calls using Natural Mocks™ makes testing much easier. With this feature, you no longer have to create many mocks to mock a single line in the production code that uses a chain of calls.

using (RecordExpectations recorder = RecorderManager.StartRecording())
{
   // CAUTION: ALL calls here are mocked!!!
   recorder.ExpectAndReturn(MyDatabaseFactory.GetDatabase().Insert(""),false);
}
// Thats it folks


Enhance mocking framework

This version adds some new APIs to help build a mocking framework:

  • Check.IsMock - checks that the object passed is actually a Typemock Isolator object
  • MockManager.ClearAll() - clears all expectation

The test pattern has changed and we recommend to call MockManager.ClearAll() in the [TearDown] method.


Validate fields of future instances

It is now possible to validate fields of future object using the new mock.MockedInstance property.


Easier logging

Yes, we also have bugs. But we now have created a better story for the log files; we have also added logging for tests running from within Visual Studio.



Typemock Isolator Tracer enhancements The following enhancements were added to the Typemock Isolator Tracer:
  • Typemock Isolator Trace logs can now be saved and reloaded; this will allow developers to assist with the debugging of their Mocked Types
  • Menu added for easier navigation
  • Autoscrolling of Trace Stack to all relevant items when selecting a mocked instance in the Tree view

Better static constructor story

Typemock Isolator now handles mocking static constructors in a much better way. The static constructor will be called if it was mocked in a previous test and is not the current one.

Note: Automatic calling of the static constructor will not work before static field access, only with method access.


Autodeploy for build servers

Enterprise Edition Only (see Typemock Isolator Editions)
It is now possible to run Typemock Isolator tests without installing the software.


64-bit side by side

64-bit and 32-bit Typemock Isolator versions can now work together on the same machine.


Other fixes

Bug fixes and other small features added in this version.


Obsolete APIs Following is a list of obsolete APIs and their new counter APIs.

Old API New API
MockManager.LogFile None
TMockRunner -log TMockRunner -logPath <path> -logVerbose [0-9]
MSBuild Logger="true" LogPath="$(Path)" LogVerbose="0-9"
NAnt logger="true" logPath="${Path} logVerbose="0-9"
   
 

Copyright © Typemock Ltd. 2004-2020. All Rights Reserved.