Skip to content

Commit

Permalink
Polish #29727: Mention Kotlin andExpectAll in reference manual (#29766)
Browse files Browse the repository at this point in the history
This just adds a Kotlin snippet alongside the Java snippet in the
reference manual.

Relates to gh-29727
Closes gh-27317
  • Loading branch information
simonbasle committed Jan 4, 2023
1 parent 74f5819 commit e2832ea
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit e2832ea

Please sign in to comment.