AbstractDataPartSpecBuilder

Base builder for matching part content type and content.

Used by FilePartSpecBuilder and DataPartSpecBuilder.

Example:

FilePartSpecBuilder("avatar").apply {
contentType("image/png")
text("expected content")
}

Inheritors

Functions

Link copied to clipboard
fun bytes(matcher: Matcher<ByteArray?>): T

Requires the part content bytes to satisfy a Kotest matcher.

fun bytes(value: ByteArray): T

Requires the part content bytes to equal value.

fun bytes(predicate: (ByteArray?) -> Boolean): T

Requires the part content bytes to satisfy predicate.

Link copied to clipboard
fun contentType(matcher: Matcher<ContentType?>): T

Requires the part content type to satisfy matcher.

fun contentType(contentType: ContentType): T
fun contentType(contentType: String): T

Requires the part content type to equal contentType.

Link copied to clipboard
fun text(matcher: Matcher<String?>): T

Requires the part content decoded as UTF-8 text to satisfy a Kotest matcher.

fun text(predicate: (String?) -> Boolean): T

Requires the part content decoded as UTF-8 text to satisfy predicate.

fun text(value: String): T

Requires the part content decoded as UTF-8 text to equal value.