I am getting the NestedCallException when calling a static method that doesn't use nested chain calls:
Isolate.WhenCalled( () => ApplicationRecordTransformer.GetLateChargeAssessment( null ) ).WillReturn( "562.00" );
Error Message:
Test method FinanceSource.Core.Models.ServicesTests.Funding.RecordTransformerLeaseTest.TransformApplicationRecord_Should_Generate_Correct_Output_for_US threw exception: TypeMock.ArrangeActAssert.NestedCallException:
*** WhenCalled does not support using a method call as an argument.
- To fix this pass null instead of ApplicationRecordTransformer.GetLateChargeAssessment()
***
* Example - this would work:
- MyObj argument = Something.Other().GetStuff();
- Isolate.WhenCalled(() => ObjUnderTest.MethodUnderTest(argument))...;
***
* Example - this would not work:
- Isolate.WhenCalled(() => ObjUnderTest.MethodUnderTest(Something.Other().GetStuff()))...;