WebTestClient supports JSONAssert for comparing full JSON content and JSONPath for extracting and matching specific values. Use whichever one you prefer or fits the case. Also the API is fluent so it's not clear what you mean. Perhaps there are other assertions you'd like to see? Please be more specific.
As an aside, at various places in the API, there are java.util.function.Consumer callbacks (e.g. test) that expose the underlying data. Those hooks can be used to plug any assertion library.
Kamil opened SPR-16737 and commented
Reactive
WebTestClient
is using JsonPath assertions like: ```jsonPath("$[0]['gender']")
Issue Links:
1 votes, 2 watchers
The text was updated successfully, but these errors were encountered: