Try the below code:
public interface IDrawView
{
}
[Test, Isolated]
public void WhatThis
{
IDrawView viewFake = Isolate.Fake.Instance<IDrawView>(Members.ReturnRecursiveFakes);
Isolate.WhenCalled(() => viewFake).WillReturn(viewFake);
}
I will get the below exception:
TestCase 'IsometricAppTest.Presenter.CutPresenterTest.MouseMoveClick'
failed: System.ArgumentOutOfRangeException : Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at System.Collections.Generic.List`1.get_Item(Int32 index)
at TypeMock.ArrangeActAssert.Recorder`1.a(T A_0)
D:C#WorldMapIsometricAppIsometricAppTestPresenterCutPresenterTest.cs(34,0): at IsometricAppTest.Presenter.CutPresenterTest.Init()
at TypeMock.MethodDecorator.CallRealMethod()
at TypeMock.MethodDecorator.a()
at TypeMock.MockManager.a(String A_0, String A_1, Object A_2, Object A_3, Boolean A_4, Object[] A_5)
at TypeMock.InternalMockManager.getReturn(Object that, String typeName, String methodName, Object methodParameters, Boolean isInjected)
Although this is not a correct mock, but still, the exception return is a bit weird.
________
vapor tower vaporizer