-
Notifications
You must be signed in to change notification settings - Fork 727
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 [email protected]
|
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
FluentAssertions
library. The changes focus on replacing the use ofName
andPathAndName
withSubject
andExpectation
properties in various classes and methods.Member Path Handling Improvements:
Src/FluentAssertions/Common/MemberPath.cs
: Changed the constructor to usemember.Expectation.Name
instead ofmember.Name
.Src/FluentAssertions/Common/TypeExtensions.cs
: Updated theIsEquivalentTo
method to compareproperty.Expectation.Name
withotherProperty.Expectation.Name
instead ofproperty.Name
.Consistency in Node Handling:
Src/FluentAssertions/Equivalency/Node.cs
: ReplacedPath
andPathAndName
withSubject
andExpectation
properties. Added theAdjustForRemappedSubject
method to handle remapped subject members during structural equivalency checks. [1] [2] [3] [4]Src/FluentAssertions/Equivalency/INode.cs
: RemovedName
,Path
,PathAndName
, andDescription
properties. AddedSubject
andExpectation
properties. [1] [2] [3] [4]Adjustments in Equivalency Validation:
Src/FluentAssertions/Equivalency/EquivalencyValidationContext.cs
: UpdatedIsCyclicReference
andToString
methods to useCurrentNode.Subject.PathAndName
instead ofCurrentNode.PathAndName
.Src/FluentAssertions/Equivalency/AssertionChainExtensions.cs
: Modified theFor
method to usecontext.CurrentNode.Subject.Description
instead ofcontext.CurrentNode.Description
.Updates in Matching Rules:
Src/FluentAssertions/Equivalency/Matching/MappedMemberMatchingRule.cs
: Changed theMatch
method to compareexpectedMember.Subject.Name
withexpectationMemberName
instead ofexpectedMember.Name
.Src/FluentAssertions/Equivalency/Matching/MustMatchByNameRule.cs
: Updated theMatch
method to useexpectedMember.Subject.Name
instead ofexpectedMember.Name
. [1] [2] [3]These changes collectively enhance the handling of member paths and improve the overall consistency and accuracy of the
FluentAssertions
library.Closes #2812
IMPORTANT
./build.sh --target spellcheck
or.\build.ps1 --target spellcheck
before pushing and check the good outcome