-
Notifications
You must be signed in to change notification settings - Fork 30
Add overload of ContainSubtree that takes a config #79
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
base: master
Are you sure you want to change the base?
Add overload of ContainSubtree that takes a config #79
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.
Pull Request Overview
This PR adds a new ContainSubtree
overload that accepts a configuration function parameter, providing users with more control over JSON assertion options similar to the existing BeEquivalentTo
methods. This enhancement addresses issue #78 by allowing custom assertion configurations when checking JSON subtrees.
- Adds a new
ContainSubtree
method overload with configurable assertion options - Includes comprehensive test coverage for float approximation scenarios
- Updates XML documentation parameter name for clarity
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
Src/FluentAssertions.Json/JTokenAssertions.cs | Adds new ContainSubtree overload with config parameter and fixes XML doc parameter name |
Tests/FluentAssertions.Json.Specs/JTokenAssertionsSpecs.cs | Adds test cases for float approximation using the new ContainSubtree overload |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
Just a couple of minor suggestions. You do need to update the snapshot tests using the AcceptApiChanges.ps1
to make the build green.
Also, apologies for the late review.
I also removed the bad copy-paste example doc and the misplaced end tag that the AI noticed |
The API update wasn't successful. Besides that - the changes look good. |
Adds a
ContainSubtree
overload with theFunc<IJsonAssertionOptions<object>, IJsonAssertionOptions<object>> config
parameter analogue with theBeEquivalentTo
methods.Fixes #78