Interested in a
Personal Demo ?

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


"Typemock has helped us get some difficult to test code under test, as well as speed up the writing of some business rules/classes. The new version is quite impressive with the suggested tests. Any tool that helps you write more (and better!) tests has got to help make better quality code." 
Stephen Price Lead Developer at Unlisted Marketplace
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);