-
-
Notifications
You must be signed in to change notification settings - Fork 540
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
ExcludingNestedObjects option does not behave as expected #2210
Comments
This is by design. What you're saying with |
Thanks @dennisdoomen, that makes sense. Two suggestions then:
|
What do you mean with that? |
I was going to reply
But then I read help text for p1.Should().BeEquivalentTo(p2, o => o.ExcludingNestedObjects()); fails, but p1.Should().BeEquivalentTo(p2, o => o.Excluding(p => p.Child)); succeeds. |
|
Yes that's what I got in my tests. I think documentation needs some improvement because descriptions for both options talk about "structural" equality only:
Description for On a separate note, would it be feasible to add smth like |
I did that in #2211
We have extensive documentation on this structural comparison here. Although I do agree that the documentation and the code uses different terminology. That's something for v7 to fix. |
That would be an entirely new feature. Please raise a separate feature request for that. |
Description
ExcludingNestedObjects
option does not behave as expected.Reproduction Steps
Expected behavior
Assertion passes, because help text for
ExcludingNestedObjects
saysCauses the structural equality check to exclude nested collections and complex types
, andChild
is a complex type.Actual behavior
Assertion fails with the message
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: