Package strikt.spring

Methods

fun <T : MediaType?> Builder.isCompatibleWith(expected: MediaType): Builder

Asserts that the subject is compatible with expected.

For example, a subject of application/json;charset=UTF-8 is compatiblewith the media type application/json, but not with the media type application/x-yaml.

Parameters:
  • expected: MediaType
fun <T> Builder.statusCodeIs1xxInformational(): Builder

Asserts that the status code is a 1xx Information response.

Parameters:
  • No parameters
fun <T> Builder.statusCodeIs2xxSuccess(): Builder

Asserts that the status code is a 2xx Success response.

Parameters:
  • No parameters
fun <T> Builder.statusCodeIs3xxRedirection(): Builder

Asserts that the status code is a 3xx Redirect response.

Parameters:
  • No parameters
fun <T> Builder.statusCodeIs4xxClientError(): Builder

Asserts that the status code is a 4xx Client Error response.

Parameters:
  • No parameters
fun <T> Builder.statusCodeIs5xxServerError(): Builder

Asserts that the status code is a 5xx Server Error response.

Parameters:
  • No parameters
fun <T> Builder.statusCodeIs(expected: Int): Builder

Asserts that the status code is equal to expected.

Parameters:
  • expected: Int
fun <T> Builder.statusCodeIs(expected: HttpStatus): Builder

Asserts that the status code is equal to expected.

Parameters:
  • expected: HttpStatus
fun <T : ServletResponse> Builder.contentTypeIsCompatibleWith(expected: MediaType): Builder

Asserts that the content type of the subject is compatible with expected.

Parameters:
  • expected: MediaType