This just adds a Kotlin snippet alongside the Java snippet in the reference manual. Relates to gh-29727 Closes gh-27317
This commit is contained in:
parent
74f58198fd
commit
e2832ea596
|
|
@ -445,6 +445,17 @@ all failures will be tracked and reported.
|
|||
content().contentType("application/json;charset=UTF-8"));
|
||||
----
|
||||
|
||||
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
|
||||
.Kotlin
|
||||
----
|
||||
import org.springframework.test.web.servlet.get
|
||||
|
||||
mockMvc.get("/accounts/1").andExpectAll {
|
||||
status { isOk() }
|
||||
content { contentType(APPLICATION_JSON) }
|
||||
}
|
||||
----
|
||||
|
||||
`MockMvcResultMatchers.*` provides a number of expectations, some of which are further
|
||||
nested with more detailed expectations.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue