spring-framework / org.springframework.test.web.servlet / MockMvcResultMatchersDsl

MockMvcResultMatchersDsl

class MockMvcResultMatchersDsl

Provide a MockMvcResultMatchers Kotlin DSL in order to be able to write idiomatic Kotlin code.

Author
Sebastien Deleuze

Since
5.2

Functions

content

fun content(matcher: ContentResultMatchers.() -> ResultMatcher): Unit

cookie

fun cookie(cookieInit: CookieResultMatchers.() -> ResultMatcher): Unit

flash

fun flash(matcher: FlashAttributeResultMatchers.() -> ResultMatcher): Unit

forwardedUrl

fun forwardedUrl(expectedUrl: String?): Unit

forwardedUrlPattern

fun forwardedUrlPattern(urlPattern: String): Unit

forwardedUrlTemplate

fun forwardedUrlTemplate(urlTemplate: String, vararg uriVars: Any): Unit

header

fun header(matcher: HeaderResultMatchers.() -> ResultMatcher): Unit

jsonPath

fun <T> jsonPath(expression: String, matcher: Matcher<T>): Unit
fun jsonPath(expression: String, vararg args: Any, block: JsonPathResultMatchers.() -> ResultMatcher): Unit

match

fun match(matcher: ResultMatcher): Unit

model

fun model(matcher: ModelResultMatchers.() -> ResultMatcher): Unit

redirectedUrl

fun redirectedUrl(expectedUrl: String): Unit

redirectedUrlPattern

fun redirectedUrlPattern(redirectedUrlPattern: String): Unit

request

fun request(matcher: RequestResultMatchers.() -> ResultMatcher): Unit

status

fun status(matcher: StatusResultMatchers.() -> ResultMatcher): Unit

view

fun view(matcher: ViewResultMatchers.() -> ResultMatcher): Unit

xpath

fun xpath(expression: String, vararg args: Any, namespaces: Map<String, String>? = null, xpathInit: XpathResultMatchers.() -> ResultMatcher): Unit