This is a migrated thread and some comments may be shown as answers.

IndexOutOfRangeException on Mock.Arrange

1 Answer 103 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Lou
Top achievements
Rank 1
Lou asked on 28 May 2015, 03:16 PM

In a test method, I'm trying to mock an AutoMapper call and return the object I created in my test method:

 Mock.Arrange(() => _mappingEngine.Map<DtcIgnoreModel, DTCIgnore>(dtcIgnoreMockObj, Arg.IsAny<DTCIgnore>())).Returns(dtcIgnore);

But I get an IndexOutOfRangeException when I hit this line. Says it "occurred in Telerik.JustMock.dll but was not handled in the user code. Additional Information: Index was outside the bounds of the array."

I'm not sure what array it's referring to. Any advice would be appreciated.

 

-L

1 Answer, 1 is accepted

Sort by
0
Kaloyan
Telerik team
answered on 03 Jun 2015, 08:19 AM
Hello Lou,

I see that you have opened a support ticket on the same matter. I suggest we continue our conversation there and update the forum thread, once there is a solution. Until then, I will close this as duplicate.

Regards,
Kaloyan
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Lou
Top achievements
Rank 1
Answers by
Kaloyan
Telerik team
Share this question
or