spring-framework / org.springframework.test.web.servlet.result / ContentResultMatchersDsl

ContentResultMatchersDsl

class ContentResultMatchersDsl

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

Author
Sebastien Deleuze

Since
5.3

Functions

bytes

fun bytes(expectedContent: ByteArray): Unit

contentType

fun contentType(contentType: String): Unit
fun contentType(contentType: MediaType): Unit

contentTypeCompatibleWith

fun contentTypeCompatibleWith(contentType: String): Unit
fun contentTypeCompatibleWith(contentType: MediaType): Unit

encoding

fun encoding(contentType: String): Unit

json

fun json(jsonContent: String, strict: Boolean = false): Unit

node

fun node(matcher: Matcher<Node>): Unit

source

fun source(matcher: Matcher<Source>): Unit

string

fun string(matcher: Matcher<String>): Unit
fun string(expectedContent: String): Unit

xml

fun xml(xmlContent: String): Unit