Improved reporting of properties and field details in the equivalency API#1379
Merged
dennisdoomen merged 1 commit intofluentassertions:developfrom Nov 1, 2020
Conversation
jnyrup
reviewed
Aug 16, 2020
| Subject = context.Subject | ||
| }; | ||
|
|
||
| adjustedCopy.SelectedMember.Path = CollectionMemberMemberInfo.GetAdjustedPropertyPath(context.SelectedMember.Path); |
Member
There was a problem hiding this comment.
Should the Description also still be set?
Member
Author
There was a problem hiding this comment.
Ah yes.. No, it's a weird piece of code. It did not update the description at all (which is what Clone does right now). I've added to the bullet list in this PR to see what it really tries to do.
721a1d1 to
b632fc5
Compare
bea6ba3 to
87aaed7
Compare
042ae8a to
8594916
Compare
9ca026f to
7776cd3
Compare
63cff70 to
67d6d33
Compare
673552c to
88f9c84
Compare
21e00e5 to
8763de7
Compare
202fb5a to
be1e444
Compare
jnyrup
reviewed
Oct 27, 2020
Src/FluentAssertions/Equivalency/Selection/ExcludeMemberByPathSelectionRule.cs
Outdated
Show resolved
Hide resolved
Member
Author
Sorry, did not notice that you already reviewed it. |
99ee786 to
4e8994d
Compare
jnyrup
reviewed
Oct 31, 2020
Src/FluentAssertions/Equivalency/EquivalencyValidationContext.cs
Outdated
Show resolved
Hide resolved
Tests/FluentAssertions.Specs/Equivalency/BasicEquivalencySpecs.cs
Outdated
Show resolved
Hide resolved
Member
|
These two now removed class names gave me a good laugh
|
5 tasks
logiclrd
reviewed
Oct 31, 2020
4e8994d to
588f089
Compare
jnyrup
reviewed
Nov 1, 2020
588f089 to
5f75642
Compare
… API The equivalency assertions will now include the type of the member and whether it involves a field or property. This required significant refactorings: * The properties of `IEquivalencyValidationContext` have been combined into the `INode` hierarchy and the two `Reason` and `Tracer` classes * Moved a lot of logic related to the object graph location into the `Node`, `Field` and `Property` classes. * The `SelectedMemberInfo` class has been removed, since it main user, `IMemberInfo` has been flattened. * Several methods that took an `IMemberInfo`, but could also act on other objects than a property or field now take an `IObjectInfo`
5f75642 to
cc10ae7
Compare
jnyrup
approved these changes
Nov 1, 2020
1 task
JordanWestern
added a commit
to cucumber/common
that referenced
this pull request
Sep 16, 2021
aurelien-reeves
added a commit
to cucumber/common
that referenced
this pull request
Sep 17, 2021
* Update dependency FluentAssertions to v6 * Fix issues caused by major version update in fluent assertions library changes seen here - fluentassertions/fluentassertions#1379 Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: Jordan Western <[email protected]> Co-authored-by: Aslak Hellesøy <[email protected]> Co-authored-by: Aurélien Reeves <[email protected]>
cukebot
pushed a commit
to cucumber/gherkin-dotnet
that referenced
this pull request
Sep 17, 2021
* Update dependency FluentAssertions to v6 * Fix issues caused by major version update in fluent assertions library changes seen here - fluentassertions/fluentassertions#1379 Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: Jordan Western <[email protected]> Co-authored-by: Aslak Hellesøy <[email protected]> Co-authored-by: Aurélien Reeves <[email protected]>
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.
The equivalency assertions will now include the type of the member and whether it involves a field or property.
This required significant refactorings:
IEquivalencyValidationContexthave been combined into theINodehierarchy and the twoReasonandTracerclassesNode,FieldandPropertyclasses.SelectedMemberInfoclass has been removed, since it main user,IMemberInfohas been flattened.IMemberInfo, but could also act on other objects than a property or field now take anIObjectInfoBecause the final design evolved while doing the refactorings, I had to give up on nice and clean commits.
IMember, Field and PropertyIMemberRootIsCollectionfromIEquivalencyValidationContextIsRootintoIMemberCollectionMemberAssertionRuleDecorator.IEquivalencyValidationContextinherit fromIMemberInfoINode.Pathhas no publicsetterEquivalencyValidationContext.AsNestedMemberIMemberproperties into more functional methodsIMemberreally needGetValueand the access modifier getters?INode.Descriptionfrom its state instead of setting it externallyTracer.WriteLineneeds to rewrite the pathINode.Clonereally necessaryWithoutInitialIndexQualifier?Follow-up PR
GetExpectationTypecalculation intoIEquivalencyContext.ExpectedType.