You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'll try to summarise the old Google Code issue's comments:
It was stated that this is by design. And it is. The fact that there is an error message stating very clearly what should be done instead:
System.ArgumentException : To specify a setup for public property IFoo.Bar,
use the typed overloads, such as:
mock.Setup(x => x.Bar).Returns(value);
mock.SetupGet(x => x.Bar).Returns(value); //equivalent to previous one
mock.SetupSet(x => x.Bar).Callback(callbackDelegate);
An overload .Protected(bool allowPublicMembers) was suggested.
A rename of the Moq.Protected namespace into Moq.Unsafe was suggested.
The discussion on Google Code apparently never came to an end. What exactly are you requesting by reopening this issue?
@davidkassa: For the moment, I am closing this issue due to inactivity. We can always reopen it if you still want to follow up on this. In that case, just reply back.
I recently ran into this issue for similar reasons.
The text was updated successfully, but these errors were encountered: