Interested in a
Personal Demo ?

Name* :
Please Enter your Name
Company E–Mail* :
Please Enter a Valid Email


"Typemock Isolator is a really great product. The best mocking framework I have used so far."
Mikael Thomsen, Vestas Wind Systems A/S
Success stories


US Toll Free
Outside US
Get your printable quote
Buy online


Avoid calling 'new' inside Isolator calls

Currently, Typemock Isolator has a limitation, where calling a constructor inside a 'WhenCalled' or 'WasCalled' method invocation can cause runtime problems.

this is a problem:

Isolate.WhenCalled(()=>SomeObject.DoSomething(new OtherObject() )).WillReturn(3);


instead, do this:

var myObject = new OtherObject(); 
Isolate.WhenCalled(()=>SomeObject.DoSomething(myObject )).WillReturn(3);