Isolator 7.5, Extending mscorlib support

With each release of Typemock Isolator we add some more mscorlib functionality. Faking mscorlib is tricky, since these classes are used throughout the system and Faking them can cause strange results, as the test runners use these functionalities too. Just imagine faking string to always equal “this is power”.

With all this we have added 2 new features:

Support Faking Directory

if your production code does this:

if (Directory.Exists(“C:\Program Files\MySoftware”))

You can now write the following test

Isolate.WhenCalled(()=> Directory.Exists(null)).WillReturn(true);|


And… You can now verify that the check was make

Isolate.VerifyWasCalledWithExactArguments(()=>Directory.Exists((“C:\Program Files\MySoftware”));


Support default IEnumerable recursive fakes

Until now if you had a method that returned an IEnumerable, it would not be faked automatically using Recursive Fakes.

So if you had this code

public class MyClass
    public IList<int> GetMyList()

Faking MyClass and calling GetMyList would have returned a null, now we return an empty list. So the following wont fail on NullReferenceException

var fake =Isolate.Fake.Instance<MyClass>();
var fakeList = fake.GetMyList();


See more Isolator 7.5 Released

Much more to come in the future. But for now, go download Isolator 7.5.