This is a migrated thread and some comments may be shown as answers.
ReturnsCollection with Mock.NonPublic.Arrange
1 Answer 43 Views
This is a migrated thread and some comments may be shown as answers.
ari
Top achievements
Rank 1
ari asked on 23 Mar 2012, 12:01 PM
hi

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?)


1 Answer, 1 is accepted

Sort by
0
Ricky
Telerik team
answered on 27 Mar 2012, 05:06 PM
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:

http://www.telerik.com/support/pits.aspx#/public/justmock/10491


Kind Regards
Mehfuz
the Telerik team

Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Asked by
ari
Top achievements
Rank 1
Answers by
Ricky
Telerik team
Share this question
or