Repository navigation
Fix JsonNodeAssertions.HaveProperty/NotHaveProperty for properties with explicit null values - #3282
Merged
Merged
Conversation
Copilot
AI
changed the title
[WIP] Fix JsonNodeAssertions to distinguish absent properties from null values
Fix JsonNodeAssertions.HaveProperty/NotHaveProperty for properties with explicit null values
Jul 28, 2026
dennisdoomen
marked this pull request as ready for review
July 28, 2026 09:26
Test Results 37 files ± 0 37 suites ±0 2m 35s ⏱️ +5s Results for commit e73901b. ± Comparison against base commit 8a7ddde. This pull request removes 10 and adds 10 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
jnyrup
reviewed
Jul 28, 2026
dennisdoomen
added a commit
that referenced
this pull request
Jul 28, 2026
…ing (#3283) Build/_build.csproj transitively pulled in System.Security.Cryptography.Xml 10.0.6, which has several known high-severity DoS vulnerabilities. Since Directory.Build.props sets TreatWarningsAsErrors, NuGet's audit warning (NU1903) is escalated to a build error, breaking restore for the Build project on every PR/branch (including #3282), unrelated to any code change. Pin a direct PackageReference to the patched 10.0.10 version to override the vulnerable transitive dependency. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Qodana for .NETIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked Contact Qodana teamContact us at qodana-support@jetbrains.com
|
dennisdoomen
force-pushed
the
copilot/fix-jsonnodeassertions-null-check
branch
from
July 28, 2026 12:36
50867f0 to
abbfdcb
Compare
This was referenced Oct 20, 2026
This branch was previously deployed
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.
JsonNodeAssertions<T>.HaveProperty/NotHavePropertyrelied onSubject?[code]returningnullto infer a missing property. SinceJsonObject's indexer returnsnullboth for an absent key and for a key explicitly set to JSONnull, these assertions couldn't tell the two cases apart:Changes
HaveProperty/NotHavePropertynow check presence viaJsonObject.TryGetPropertyValueinstead of the indexer, which distinguishes "key absent" from "key present with a null value"nullvalue for bothHavePropertyandNotHavePropertydocs/_pages/releases.md