Properly report the path even if custom mapping is used - #2860
#2860Merged
dennisdoomen merged 1 commit intoDec 21, 2024
fluentassertions:developfluentassertions/fluentassertions:developfrom
dennisdoomen:fix/2812-with-mappingdennisdoomen/fluentassertions:fix/2812-with-mappingCopy head branch name to clipboard
Merged
Properly report the path even if custom mapping is used#2860dennisdoomen merged 1 commit intofluentassertions:developfluentassertions/fluentassertions:developfrom dennisdoomen:fix/2812-with-mappingdennisdoomen/fluentassertions:fix/2812-with-mappingCopy head branch name to clipboard
dennisdoomen merged 1 commit into
fluentassertions:developfluentassertions/fluentassertions:developfrom
dennisdoomen:fix/2812-with-mappingdennisdoomen/fluentassertions:fix/2812-with-mappingCopy head branch name to clipboard
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
|
dennisdoomen
force-pushed
the
fix/2812-with-mapping
branch
from
December 1, 2024 20:31
bcdaff2 to
4c6a722
Compare
Member
|
Thinking aloud: since #2812 has a workaround and this is not a regression, should this be targeted against |
Member
Author
My thought was that if this can be fixed in a non-breaking way, I might consider targeting |
dennisdoomen
force-pushed
the
fix/2812-with-mapping
branch
5 times, most recently
from
December 7, 2024 08:38
70b9c94 to
93a86eb
Compare
Pull Request Test Coverage Report for Build 12437282824Details
💛 - Coveralls |
dennisdoomen
force-pushed
the
fix/2812-with-mapping
branch
2 times, most recently
from
December 7, 2024 09:14
85775b7 to
9659be1
Compare
dennisdoomen
force-pushed
the
fix/2812-with-mapping
branch
12 times, most recently
from
December 14, 2024 13:27
06aae03 to
5c44716
Compare
dennisdoomen
force-pushed
the
fix/2812-with-mapping
branch
4 times, most recently
from
December 15, 2024 12:27
b138371 to
e04141c
Compare
dennisdoomen
marked this pull request as ready for review
December 15, 2024 12:43
This was referenced Jul 19, 2026
Open
This was referenced Jul 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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