IndexOutOfRangeException on Mock.Arrange

2 posts, 0 answers
  1. Lou
    Lou avatar
    1 posts
    Member since:
    Mar 2015

    Posted 28 May 2015 Link to this post

    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.



  2. Kaloyan
    Kaloyan avatar
    871 posts

    Posted 03 Jun 2015 Link to this post

    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.

    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
  3. DevCraft R3 2016 release webinar banner
Back to Top