Skip to content

Commit fc55c53

Browse files
snicollbclozel
authored andcommitted
Avoid usage of JsonExpectationsHelper#assertEquals
This has been deprecated in Spring Framework 6.2. Closes gh-1107 Signed-off-by: Stéphane Nicoll <stephane.nicoll@broadcom.com>
1 parent cc189be commit fc55c53

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spring-graphql-test/src/main/java/org/springframework/graphql/test/tester/DefaultGraphQlTester.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -31,6 +31,7 @@
3131
import com.jayway.jsonpath.DocumentContext;
3232
import com.jayway.jsonpath.JsonPath;
3333
import com.jayway.jsonpath.TypeRef;
34+
import org.skyscreamer.jsonassert.JSONAssert;
3435

3536
import org.springframework.core.ParameterizedTypeReference;
3637
import org.springframework.core.ResolvableType;
@@ -42,7 +43,6 @@
4243
import org.springframework.graphql.support.DocumentSource;
4344
import org.springframework.lang.Nullable;
4445
import org.springframework.test.util.AssertionErrors;
45-
import org.springframework.test.util.JsonExpectationsHelper;
4646
import org.springframework.test.util.JsonPathExpectationsHelper;
4747
import org.springframework.util.Assert;
4848
import org.springframework.util.CollectionUtils;
@@ -469,7 +469,7 @@ private void matchesJson(String expected, boolean strict) {
469469
this.delegate.doAssert(() -> {
470470
String actual = this.delegate.jsonContent(this.jsonPath);
471471
try {
472-
new JsonExpectationsHelper().assertJsonEqual(expected, actual, strict);
472+
JSONAssert.assertEquals(expected, actual, strict);
473473
}
474474
catch (AssertionError ex) {
475475
throw new AssertionError(ex.getMessage() + "\n\n" + "Expected JSON content:\n'" + expected + "'\n\n"

0 commit comments

Comments
 (0)