Sunday, October 18, 2009

TypeMock Isolator 5.4.2 Released.

Hot on the heels of version 5.3.5, Isolator 5.4.2 has just been released. The new feature of this release is Intellitest which is a tool to help developers create the arrange section for tests. (AAA – Arrange, Act, Assert). So how does this Intellitest work? Well there is some sample footage of it in action here and here. I was just trying it out now with a simple class library.

So I have an interface like so:

namespace ClassLibrary1
{
    public interface IPerson
    {

string GetFirstName();

string GetLastName();

    }
}

which is used by this class:

namespace ClassLibrary1
{
    public class Class1
    {
        public string DoSomething(IPerson p)
        {
            return string.Format("{0} {1}", p.GetFirstName(), p.GetLastName());
        }
    }
}
I go ahead and create a unit test project and start writing my test:

[TestMethod]
public void GetSomethingTest()
{
    Class1 target = new Class1();
    target.DoSomething();
}

The cool stuff happens once I put the caret in the method call for DoSomething() I get this window appear:

image

I can now choose to create a fake IPerson to pass to my DoSomething(), which Isolator takes care for me by automatically inserting the code needed to perform the faking:

image

This has great potential, by adding functionality that can speed up the creation of the arrange code for developers, I think TypeMock are adding another great asset to the Isolator feature list.

At the moment, Intellitest only works with interfaces, but classes will be supported soon. I can’t wait to see what’s in store when this feature matures. Though my only concern is that, with a recent increase in price for Isolator, that Intellitest doesn’t

  • Increase the cost of Isolator even more.
  • Becomes a separate product that you have to pay for.

Chances are one of the above options will become a reality. Personally I hope they choose the second option, since I’d rather pay for Isolator with the current feature set, and have the option to purchase Intellitest if I really wanted it.