Isolator V7.4 Released

Isolator V7.4 Released

We’re psyched about this one: a big collection of cool features in this release that make unit testing even easier. So here’s what’s new in V7.4:

Visual coverage: Now you can see on the tested code what’s covered, what not and what causes the test to fail. Along with the other navigation features of the SmartRunner, it becomes a lean, mean bug-fixing machine.

The default is to see all the covered code in the method:



If you select different tests, you’ll see each one’s path in green and the rest is greyed out:




And if something bad happened you’ll know too (in red). That either an assert that failed, or an exception thrown. In any case, you can see directly on the code where that happened:




The SmartRunner is now faster to run and handles large solutions better. In addition we’ve got some productivity boosters:  Keyboard shortcuts, re-running and re-debugging, and opening test and method windows automatically as you navigate to them.



Got some new mocking stuff as well. Customers have been asking for years the ability to count the number of calls made to a method. Behold the new GetTimesCalled API:

   1: [TestMethod]

   2: public void Verify_CallWasMadeTwice()

   3: {

   4:     var fakeDependency = Isolate.Fake.Instance<Dependency>();

   5:     var cut = new ClassUnderTest();

   6:     cut.DoAction(2, fakeDependency);

   7:     cut.DoAction(3, fakeDependency);

   8:     int count = Isolate.Verify.GetTimesCalled(() => fakeDependency.CheckSecurity("",""));

   9:     Assert.AreEqual(2, count);

  10: }

Plus here’s another common request. Fake.NextInstance works great for concrete types. But sometimes you want to fake the next object that implements an interface or an abstract class. This is common when using inversion of control containers. So now both Fake.NextInstance and Fake.AllInstances work with abstract classes and interfaces as well.

   1: [TestMethod]

   2: {

   3:     public void Fake_ImplementedDependency()

   4:     var fake = Isolate.Fake.NextInstance();

   5:     // ConcreteDependency implements IDependency

   6:     var dependency = new ConcreteDependency();

   7:     bool result = dependency.ThrowsAnException();

   8:     // Call was faked

   9:     Assert.IsFalse(result);

  10: }


V7.4 Also got a whole lot of fixes, and even linking with OpenCover v4. So check out the new version, and let us know what you think!