Add missing Kotlin example for expectAll()
See gh-33341
This commit is contained in:
committed by
Stéphane Nicoll
parent
38a3d18256
commit
7e4884fcfa
@@ -339,6 +339,19 @@ Java::
|
|||||||
spec -> spec.expectHeader().contentType(MediaType.APPLICATION_JSON)
|
spec -> spec.expectHeader().contentType(MediaType.APPLICATION_JSON)
|
||||||
);
|
);
|
||||||
----
|
----
|
||||||
|
|
||||||
|
Kotlin::
|
||||||
|
+
|
||||||
|
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
|
||||||
|
----
|
||||||
|
client.get().uri("/persons/1")
|
||||||
|
.accept(MediaType.APPLICATION_JSON)
|
||||||
|
.exchange()
|
||||||
|
.expectAll(
|
||||||
|
{ spec -> spec.expectStatus().isOk() },
|
||||||
|
{ spec -> spec.expectHeader().contentType(MediaType.APPLICATION_JSON) }
|
||||||
|
)
|
||||||
|
----
|
||||||
======
|
======
|
||||||
|
|
||||||
You can then choose to decode the response body through one of the following:
|
You can then choose to decode the response body through one of the following:
|
||||||
@@ -704,4 +717,3 @@ Kotlin::
|
|||||||
.andExpect(model().attribute("string", "a string value"));
|
.andExpect(model().attribute("string", "a string value"));
|
||||||
----
|
----
|
||||||
======
|
======
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user