Use this to call the original method after exiting DoInstead.
Namespace: TypeMock
Assembly: TypeMock (in TypeMock.dll) Version: 9.3.6.0 (9.3.6.0)
Syntax
Examples
public int Foo() { return 1; } [Isolated,TestMethod] public void Test() { Isolate.WhenCalled(() => Foo()).DoInstead(context=> { context.WillCallOriginal(); return 0; // this return value is ignored }); Assert.AreEqual(Foo(), 1); }
See Also