-
-
Notifications
You must be signed in to change notification settings - Fork 794
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use SetupGet on protected virtual property in other project #431
Comments
Try this..
|
Hi, |
@netmajor: @lampidudelj has already pointed out that this is what Apart from that, since you've defined Fundamentally, you just cannot bypass normal C# language rules, and neither can Moq. If you declare a property I am going to close this issue since it's really more a question about regular .NET and C# type member visibility rules than it is about Moq (which already provides what it can). |
MogProtecktedTest.zip
I have simple class in one project:
and I am testing that code in other project :
I have error : "CS0122 'Class1.x' is inaccessible due to its protection level" on this line " _bizLogicMock.SetupGet(p => p.x);"
When I have that class in same project it works.
I have attached project.
The text was updated successfully, but these errors were encountered: