Release Notes

Version 5.1.2

These are the release notes for Release 5.1.2.


New Features
  • AAA API support for throwing exceptions when a constructor is called. This feature is available through the Isolate.Swap.NextInstance<T>().ConstructorWillThrow() Method:
  • Isolate.Swap.NextInstance<RealLogger>.ConstructorWillThrow(new TimeOutException());

    ...

    // the exception will be thrown here:
    RealLogger logger = new RealLogger();

  • Added documentation and an example project about unit testing SharePoint applications. You can also learn more on our Unit Testing Microsoft SharePoint web page.

General fixes

In 5.1.2:

  • Methods faked with the Members.CallOriginal option are now not marked as faked ("painted") when stepping into them in the debugger
  • A bug occasionally causing expectations to be carried between tests  even though the [Isolated] attribute has been applied to the tests is fixed. This caused specific tests to fail when running in a test suite, even though they passed individually.
  • An issue with faking objects which override  the GetHashCode() method with AAA is fixed
  • A bug which caused the real constructor of fake objects to be called when the objects are swapped with future instantiations is fixed.
  • Several exception messages have been simplified and cleared up. This should further improve in the next version.
  • A few layout problems in the configuration dialog have been resolved.


Known Issues
  • Isolator now installs into Program Files->Typemock->Isolator->5.1. When removing former versions, some artifcats on the file system and menus may remain, which can be deleted manually. 
  • When faking behavior for a chained call beginning with a static method for than once, the last behavior may override previous expectations:
  • Isolate.WhenCalled(() => ProductFactory.GetProduct().Name).WillReturn("ProductA");
    Isolate.WhenCalled(() => ProductFactory.GetProduct().Price).WillReturn(100);

    // may fail: the second behavior setting declaration overrid the first.
    Assert.AreEqual("ProductA", ProductFactory.GetProduct.Name);


Breaking changes
  • Starting version 5.1.1: Obsoleted Isolate.SwapNextInstance() which is replaced by Isolate.Swap.NextInstance(). This is done for consistency with other entries under Isolate.Swap.


 

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