I'm using rhino mock in my unit tests and I'm trying to create a mock using the following code:
var userDetails = MockRepository.GenerateMock<ReadOnlyCollection<UserDetails>>();
But when I run the unit test I get the following error:
Can not instantiate proxy of class:
System.Collections.ObjectModel.ReadOnlyCollection`
1[[SolutionName.FolderName,]].
Could not find a parameterless constructor.
I have searched on the net and found similar questions and solutions, one for moq using the SetupGet() method but I don't know what the equivalent of this is in rhino mocks. (The UserDetails class does have a parameterless constructor) How do I create a stub/mock for the ReadOnlyCollection?