-
Notifications
You must be signed in to change notification settings - Fork 784
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
Check attribute filter deep equals #2246
Conversation
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.
Although this works, we can pull this a little broader by validating if the configured filter
in the DeepEqualsMatcher
is of type AllFieldsFilter
. If this is the case, we can assume that (1) the user doesn't care because they set the filter
to AllFieldsFilter
or (2) they haven't adjusted the filter and use the default.
test/src/main/java/org/axonframework/test/matchers/DeepEqualsMatcher.java
Outdated
Show resolved
Hide resolved
By checking whether the AllFieldsFilter is used, we can deduce if somebody wants to filter the contents of the event. If this is the case, we shouldn't go down the top-level equals path, but down the reflective equals path. #2246
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.
My concerns have been addressed, hence I'm approving this pull request.
Kudos, SonarCloud Quality Gate passed! |
Since 4.5.10 when I register a field to be ignored in a fixture test, the field is not ignored. In the DeepEqualsMatcher a check is missing when before calling the equals method of the object.