-
Notifications
You must be signed in to change notification settings - Fork 731
Optionally include internal members in equivalency assertions #1575
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
Conversation
6b43908 to
9f66ac0
Compare
| return type | ||
| .GetProperties(AllInstanceMembersFlag) | ||
| .Where(property => property.GetMethod?.IsPrivate == false) | ||
| .Where(property => includeInternals || property.GetMethod?.IsAssembly == false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this handle properties marked as private protected or protected internal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK private protected is not relevant here, but protect internal was. I've added extra tests to cover this scenario.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering a bit about what that means to protected members.
We ignore protected members
unless it's protected internal
unless it private protected?
| return type | ||
| .GetProperties(AllInstanceMembersFlag) | ||
| .Where(property => property.GetMethod?.IsPrivate == false) | ||
| .Where(property => includeInternals || property.GetMethod?.IsAssembly == false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering a bit about what that means to protected members.
We ignore protected members
unless it's protected internal
unless it private protected?
Why do you care about |
BeEquivalentTo will no longer include internal properties and fields, unless IncludingInternalProperties or IncludingInternalFields is used
|
I do not care about |
BeEquivalentTowill no longer includeinternalproperties and fields, unlessIncludingInternalPropertiesorIncludingInternalFieldsis usedFixes #1205, #744