Lucas
04/10/2018, 2:19 PMWebTestClient
instance?
For example, instead of writing
client.get()
.uri {
it.path("/get")
.queryParam("name", "John Smith")
.queryParam("age", 45)
.queryParam("isCanadian", true)
.build()
}
.exchange()
.expectStatus().isOk
.expectBody()
.jsonPath("$.person").exists()
Write something like
client.get()
.uri("/get") {
+queryParam("name" to "John Smith")
+queryParam("age" to 45)
+queryParam("isCanadian" to true)
}
.exchange()
.expectStatus().isOk
.expectBody()
.jsonPath("$.person").exists()
tmg
04/11/2018, 10:00 AMLucas
04/11/2018, 2:49 PM