Make JsonPathAssertions#isEqualTo parameter nullable

Closes gh-35445
This commit is contained in:
Sébastien Deleuze
2025-09-09 11:25:58 +02:00
parent ebb8e34570
commit 9e8c64011d
2 changed files with 8 additions and 2 deletions
@@ -57,7 +57,8 @@ class JsonPathExpectationsHelperTests {
'whitespace': ' ',
'emptyString': '',
'emptyArray': [],
'emptyMap': {}
'emptyMap': {},
'nullValue': null
}""";
private static final String SIMPSONS = """
@@ -249,6 +250,11 @@ class JsonPathExpectationsHelperTests {
new JsonPathExpectationsHelper("$.num").assertValue(CONTENT, 5);
}
@Test
void assertNullValue() {
new JsonPathExpectationsHelper("$.nullValue").assertValue(CONTENT, (Object) null);
}
@Test // SPR-14498
void assertValueWithNumberConversion() {
new JsonPathExpectationsHelper("$.num").assertValue(CONTENT, 5.0);