ReturnsCollection with Mock.NonPublic.Arrange

2 posts, 0 answers
  1. ari
    ari avatar
    20 posts
    Member since:
    Jun 2010

    Posted 23 Mar 2012 Link to this post


    is it possible to use   ReturnsCollection   with  Mock.NonPublic.Arrange

    Mock.NonPublic.Arrange(fw, "GetRoleClassesAndRights", 10).ReturnsCollection(CreateDocumentClassAndRoleRightsList());

    I could not  do it.. Why.. there comes error ..ReturnsCollection    

    Error 122 'Telerik.JustMock.Expectations.ActionExpectation' does not contain a definition for 'ReturnsCollection' and no extension method 'ReturnsCollection' accepting a first argument of type 'Telerik.JustMock.Expectations.ActionExpectation' could be found (are you missing a using directive or an assembly reference?)

  2. Ricky
    Ricky avatar
    467 posts

    Posted 27 Mar 2012 Link to this post

    Hi Ari,

    Thanks again for contacting us regarding the issue. Currently, we don’t support ReturnsCollection in non-public mocking however it could be a great addition and I am entering a task for it into PITS which you can further track here:

    Kind Regards
    the Telerik team

    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top