-
Notifications
You must be signed in to change notification settings - Fork 729
Properly report the path even if custom mapping is used #2860
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
Properly report the path even if custom mapping is used #2860
Conversation
Qodana for .NETIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked Contact Qodana teamContact us at qodana-support@jetbrains.com
|
bcdaff2 to
4c6a722
Compare
|
Thinking aloud: since #2812 has a workaround and this is not a regression, should this be targeted against |
My thought was that if this can be fixed in a non-breaking way, I might consider targeting |
70b9c94 to
93a86eb
Compare
Pull Request Test Coverage Report for Build 12437282824Details
💛 - Coveralls |
85775b7 to
9659be1
Compare
06aae03 to
5c44716
Compare
b138371 to
e04141c
Compare
This pull request includes several important changes to improve the consistency and accuracy of member path handling in the
FluentAssertionslibrary. The changes focus on replacing the use ofNameandPathAndNamewithSubjectandExpectationproperties in various classes and methods.Member Path Handling Improvements:
Src/FluentAssertions/Common/MemberPath.cs: Changed the constructor to usemember.Expectation.Nameinstead ofmember.Name.Src/FluentAssertions/Common/TypeExtensions.cs: Updated theIsEquivalentTomethod to compareproperty.Expectation.NamewithotherProperty.Expectation.Nameinstead ofproperty.Name.Consistency in Node Handling:
Src/FluentAssertions/Equivalency/Node.cs: ReplacedPathandPathAndNamewithSubjectandExpectationproperties. Added theAdjustForRemappedSubjectmethod to handle remapped subject members during structural equivalency checks. [1] [2] [3] [4]Src/FluentAssertions/Equivalency/INode.cs: RemovedName,Path,PathAndName, andDescriptionproperties. AddedSubjectandExpectationproperties. [1] [2] [3] [4]Adjustments in Equivalency Validation:
Src/FluentAssertions/Equivalency/EquivalencyValidationContext.cs: UpdatedIsCyclicReferenceandToStringmethods to useCurrentNode.Subject.PathAndNameinstead ofCurrentNode.PathAndName.Src/FluentAssertions/Equivalency/AssertionChainExtensions.cs: Modified theFormethod to usecontext.CurrentNode.Subject.Descriptioninstead ofcontext.CurrentNode.Description.Updates in Matching Rules:
Src/FluentAssertions/Equivalency/Matching/MappedMemberMatchingRule.cs: Changed theMatchmethod to compareexpectedMember.Subject.NamewithexpectationMemberNameinstead ofexpectedMember.Name.Src/FluentAssertions/Equivalency/Matching/MustMatchByNameRule.cs: Updated theMatchmethod to useexpectedMember.Subject.Nameinstead ofexpectedMember.Name. [1] [2] [3]These changes collectively enhance the handling of member paths and improve the overall consistency and accuracy of the
FluentAssertionslibrary.Closes #2812
IMPORTANT
./build.sh --target spellcheckor.\build.ps1 --target spellcheckbefore pushing and check the good outcome