jtaub 15 hours ago committed by GitHub
parent
commit
8c1a066d0a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      spring-test/src/main/kotlin/org/springframework/test/web/servlet/result/ContentResultMatchersDsl.kt

8
spring-test/src/main/kotlin/org/springframework/test/web/servlet/result/ContentResultMatchersDsl.kt

@ -113,7 +113,13 @@ class ContentResultMatchersDsl internal constructor (private val actions: Result @@ -113,7 +113,13 @@ class ContentResultMatchersDsl internal constructor (private val actions: Result
/**
* @see ContentResultMatchers.json
*/
@Deprecated(message = "Use JsonCompare mode instead")
@Deprecated(
message = "Use JsonCompare mode instead",
replaceWith = ReplaceWith(
expression = "json(jsonContent, if (strict) JsonCompareMode.STRICT else JsonCompareMode.LENIENT)",
imports = ["org.springframework.test.json.JsonCompareMode"],
),
)
fun json(jsonContent: String, strict: Boolean) {
val compareMode = (if (strict) JsonCompareMode.STRICT else JsonCompareMode.LENIENT)
actions.andExpect(matchers.json(jsonContent, compareMode))

Loading…
Cancel
Save