Release Notes

Version 4.1

To view breaking changes, see below.

These are the release notes for Release 4.1. This release includes support for the new .NET 3.5.

Hide C# Code
Hide Visual Basic Code 

 


Support of .NET 3.5 syntax changes

Typemock Isolator can now be used in conjunction with the new .NET 3.5 syntax; this includes:

  • Mocking automatic properties
  • Mocking anonymous types

    using (RecordExpectations recorder = RecorderManager.StartRecording())
    {
      // Mock anonymous type
      var AnonymousType = new { Name="John", City="LA" };
    }

  • Mocking lambda expressions
  • Verifying new initialziers
  • Mocking extension methods

    using (RecordExpectations recorder = RecorderManager.StartRecording())
    {
      // Mock extension method ExtendInt
      int x = 5;
      x.ExtendInt();
      recorder.Return(1);
    }

  • Mocking LINQ statements

    var dummyData = new[] {new {Name="fake",City="typemock"},
                           new {Name="another",City="typemock"}};
    using (RecordExpectations recorder = RecorderManager.StartRecording())
    {
      // Mock Linq
      var queryResult = from c in myCustomerList
          where c.City == "Sarasota"
          select new {c.Name, c.City };
      // Return fake results
      recorder.Return(dummyData);
    }

More information can be found in the Typemock Isolator examples project and in the .NET 3.5 Syntax topic.


Integration API for tools developers

A new API was released to ease integrating Typemock Isolator with other developer tools. This API has capabilities to:

  • Query installed Typemock Isolator and installation
  • Auto-deploy Typemock Isolator
  • Link Typemock Isolator to a coverage tool
  • Start a Typemock Isolator enabled process

More information can be found in the Typemock Isolator examples project and in the Typemock Isolator Integration API topic.


Tracer enhancement

Professional Edition Only (see Typemock Isolator.NET Editions)

The tracer tool has been enhanced with the ability to pause and resume trace gathering, resize its different panes, and to mark the start and end of each test.


NCover 2.0 support

Professional Edition Only (see Typemock Isolator.NET Editions)

The new release of NCover tool (2.0.1) is now supported and can be linked or run with Typemock Isolator. Typemock Isolator also support side-by-side NCover installations.


More automation (Natural Mocks)

Professional Edition Only (see Typemock Isolator.NET Editions)

When passing a mocked return value to another mocked method, Typemock Isolator will create the value. There is no need to use Return().


General enhancements

  • Improved initial load time
  • Typemock Isolator supports auto-deployment of NCover (1.5.8)
    Use the following line in the MSBuild script to register NCover before running the tests:
    <Exec ContinueOnError="true" Command='regsvr32 /s "$(NCoverDir)\CoverLib.dll"' />
  • Added support for mocking anonymous methods declared outside a method scope
  • You can now mock assemblies that are named starting with the Typemock string

Installation defect fixes
  • Installation on Vista when UAC is enabled now works
  • Installations on machines containing only .NET 1.1 framework now work
  • Fixed 64-bit support

Decorators defect fixes
  • Mocking static constructors when using new Typemock Isolator attributes now works
  • Decorator attribute cannot call a decorated method more than once within the decorator code
  • Decorators now work when mocking out/ref parameters

Behaviors defect fixes
  • Using ExpectAndThrow or ThrowAlways on methods inherited by an interface now works
  • Using WhenArgumentMatch along with RepeatAlways now works
  • Using ExpectAndThrow on interfaces implementing other interfaces now works
  • Using throw exception on a void returning method now works (Natural Mocks)

Chain defect fix (Natural Mocks)

Enterprise Edition Only (see Typemock Isolator.NET Editions)

  • Using RepeatAlways in a chain of calls now works, even when calling static methods
  • Mocking an abstract class with static constructor in chained calls now works
  • Void-returning methods are no longer recognized as part of a chain
  • Mocking events in a chained call now works

Other fixes
  • Using the Configurator without registry permissions does not crash Typemock Isolator
  • Using TMockRunner.exe with the -version argument now works
  • VerifyWithTimeout will pass even when no expectations are set
  • Usage of custom security attributes is now fully supported
  • Using XslCompiledTransform does not end with InvalidOperationException being thrown
  • Mocking a type and arrays of that type in the same tests now works
  • Redundant calls to ToString() inside Typemock Isolator code during tests was removed
 

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