Release Notes

Version 7.5.2


New Features  Assertion:
  • Added API to to verify that non public generic static methods were called
  • [TestMethod]
    [Isolated]
    public void verifyStaticNonPublicGenericMethodWasCalled()
    {
    Isolate.Fake.Instance<LoggerFactory>(Members.CallOriginal);;

    RealLogger logger = LoggerFactory.GetLogger("logfile.txt", Access.ReadWrite);

    // Verify the call to internal method LoggerFactory.GetRealLogger() has been made with int generic parameter
    Isolate.Verify.NonPublic.WasCalled(typeof(LoggerFactory), "GetRealLogger", typeof(int));
    }

General fixes  General:
  • Enabling Isolator when using Visual Studio Runner x64
  • Added support for new dotCover runner
  • New simple UI for the "Fix References" feature
  • Fixed TypeInitializationException and InvalidProgramException
  • Workaround locked dll in build by un-selecting AutoLink

Breaking Changes:
  • Removed Redundant API CreateByRefArg and CreateOutArg
    Use Arg.ByRef Args.Out and Args.Null instead:
    [TestMethod]
    [Isolated]
    public void InvokeMethod_WithIntRefAndOutArgument_RefAndOutValuesAreAssigned()
    {
    var t = new ClassWithPrivateMethods();

    IBox val1 = Args.Ref(10);
    IBox val2 = Args.Out();
    var result = (int)Isolate.Invoke.Method(t, "MethodWithIntRefAndOutArgument", 10, val1, val2);

    Assert.AreEqual(result, 4);
    Assert.AreEqual(val1.Value, 1);
    Assert.AreEqual(val2.Value, 2);
    }

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