Class JsonPathAssertions
- java.lang.Object
- org.springframework.test.web.reactive.server.JsonPathAssertions
public class JsonPathAssertions extends Object
JsonPath assertions.- Since:
- 5.0
- Author:
- Rossen Stoyanchev
- See Also:
- https://github.com/jayway/JsonPath,
JsonPathExpectationsHelper
Method Summary
Method Detail
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()
- Since:
- 5.0.3
doesNotHaveJsonPath
public WebTestClient.BodyContentSpec doesNotHaveJsonPath()
- Since:
- 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)
.- Since:
- 5.1
value
public <T> WebTestClient.BodyContentSpec value(Matcher<T> matcher, Class<T> targetType)
- Since:
- 5.1
value
public <T> WebTestClient.BodyContentSpec value(Consumer<T> consumer)
Consume the result of the JSONPath evaluation.- Since:
- 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.- Since:
- 5.1