类 JsonPathAssertions
- java.lang.Object
- org.springframework.test.web.reactive.server.JsonPathAssertions
public class JsonPathAssertions extends Object
JsonPath assertions.- 从以下版本开始:
- 5.0
- 作者:
- Rossen Stoyanchev
- 另请参阅:
- https://github.com/jayway/JsonPath,
JsonPathExpectationsHelper
方法概要
方法详细资料
isEqualTo
public WebTestClient.BodyContentSpec isEqualTo(Object expectedValue)
exists
public WebTestClient.BodyContentSpec exists()
doesNotExist
public WebTestClient.BodyContentSpec doesNotExist()
isEmpty
public WebTestClient.BodyContentSpec isEmpty()
isNotEmpty
public WebTestClient.BodyContentSpec isNotEmpty()
hasJsonPath
public WebTestClient.BodyContentSpec hasJsonPath()
- 从以下版本开始:
- 5.0.3
doesNotHaveJsonPath
public WebTestClient.BodyContentSpec doesNotHaveJsonPath()
- 从以下版本开始:
- 5.0.3
isBoolean
public WebTestClient.BodyContentSpec isBoolean()
isNumber
public WebTestClient.BodyContentSpec isNumber()
isArray
public WebTestClient.BodyContentSpec isArray()
isMap
public WebTestClient.BodyContentSpec isMap()
value
public <T> WebTestClient.BodyContentSpec value(Matcher<T> matcher)
Delegates toJsonPathExpectationsHelper.assertValue(String, Matcher)
.- 从以下版本开始:
- 5.1
value
public <T> WebTestClient.BodyContentSpec value(Matcher<T> matcher, Class<T> targetType)
- 从以下版本开始:
- 5.1
value
public <T> WebTestClient.BodyContentSpec value(Consumer<T> consumer)
Consume the result of the JSONPath evaluation.- 从以下版本开始:
- 5.1
value
public <T> WebTestClient.BodyContentSpec value(Consumer<T> consumer, Class<T> targetType)
Consume the result of the JSONPath evaluation and provide a target class.- 从以下版本开始:
- 5.1