Add overload of ContainSubtree that takes a config#79
Conversation
There was a problem hiding this comment.
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
ContainSubtreemethod 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.
|
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. |
|
@labsin are you planning to address the rework anytime in the coming days? |
ff9be26 to
061f6fd
Compare
|
I rebased on master and redid the AcceptChanges. |
Pull Request Test Coverage Report for Build 18675139399Details
💛 - Coveralls |
|
@labsin did you see the review comments? Or do you want to abandon this PR? |
061f6fd to
2e69b25
Compare
labsin
left a comment
There was a problem hiding this comment.
I redid the work as the files indentation was changed on master.
I also noticed a few more docs errors:
- Examples that used json arguments on the method that takes a string
- references to parameters that use instead of
As I added another method that parsed json as string with error handling, I made it a static method.
|
@dennisdoomen Sorry, I noticed the approval and then didn't see any new comments. |
Adds a
ContainSubtreeoverload with theFunc<IJsonAssertionOptions<object>, IJsonAssertionOptions<object>> configparameter analogue with theBeEquivalentTomethods.Fixes #78