-
-
Notifications
You must be signed in to change notification settings - Fork 802
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
Fix Issue #328 #9
Conversation
Actually, the issue I encountered was not related to internal members, but to property protected setters, like:
The real fix to this issue is accomplished by passing However, as you say, the line I changed in |
@danielkzu I just updated the PR so that it should keep working with internal members. Nice catch! |
Looks good! Thanks! |
Fix Issue #328: Make Mock.Of work on properties with non-public setters
Was just about to report this. Has this been pushed to NuGet yet? |
Nop, pushed to github yes. I'll try to push to nuget by the end of the week /kzu from mobile
|
Ok, there's still a bug in here. The following test fails. I think your tests pass because the class you're testing is in the same class as the test method. in this case, I made the class I'm testing in a separate class and this fails.
|
Note that it fails if I remove the protected |
This is weird. Running this in the the debugger shows that the method |
It's private, so it makes sense... /kzu from mobile
|
Ah right. But the getter should still be overriden. I opened issue #14 with the problem. |
Make Mock.Of work on properties with non-public setters