Downgrade to JSONassert 1.5.x

Closes gh-34901
This commit is contained in:
Brian Clozel
2025-10-20 17:14:45 +02:00
parent baaddae38e
commit cab46c74d5
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -137,7 +137,7 @@ dependencies {
api("org.reactivestreams:reactive-streams:1.0.4")
api("org.seleniumhq.selenium:htmlunit3-driver:4.36.1")
api("org.seleniumhq.selenium:selenium-java:4.36.0")
api("org.skyscreamer:jsonassert:2.0-rc1")
api("org.skyscreamer:jsonassert:1.5.3")
api("org.testng:testng:7.11.0")
api("org.webjars:underscorejs:1.8.3")
api("org.webjars:webjars-locator-lite:1.1.0")
@@ -18,6 +18,7 @@ package org.springframework.http.converter.json;
import java.net.URI;
import org.json.JSONException;
import org.junit.jupiter.api.Test;
import org.skyscreamer.jsonassert.JSONAssert;
import tools.jackson.databind.ObjectMapper;
@@ -42,7 +43,7 @@ class ProblemDetailJacksonMixinTests {
@Test
void writeStatusAndHeaders() {
void writeStatusAndHeaders() throws Exception {
ProblemDetail detail = ProblemDetail.forStatusAndDetail(HttpStatus.BAD_REQUEST, "Missing header");
testWrite(detail,
"""
@@ -54,7 +55,7 @@ class ProblemDetailJacksonMixinTests {
}
@Test
void writeCustomProperty() {
void writeCustomProperty() throws Exception {
ProblemDetail detail = ProblemDetail.forStatusAndDetail(HttpStatus.BAD_REQUEST, "Missing header");
detail.setProperty("host", "abc.org");
detail.setProperty("user", null);
@@ -109,7 +110,7 @@ class ProblemDetailJacksonMixinTests {
assertThat(detail.getProperties()).containsEntry("host", "abc.org");
}
private void testWrite(ProblemDetail problemDetail, String expected) {
private void testWrite(ProblemDetail problemDetail, String expected) throws JSONException {
String output = this.mapper.writeValueAsString(problemDetail);
JSONAssert.assertEquals(expected, output, false);
}