Interested in a
Personal Demo ?

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


"I thank the heavens for Typemock. This is E.X.A.C.T.L.Y what I have been looking for. Thank you so much guys."
Michael Nyika,
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);