AbstractStreamingBuildingStep

abstract class AbstractStreamingBuildingStep<P : Any, R : AbstractResponseSpecification<P, *>>(mokksy: MokksyServer, buildingStep: BuildingStep<P>) : AbstractBuildingStep<P, R> (source)

Constructors

Link copied to clipboard
constructor(mokksy: MokksyServer, buildingStep: BuildingStep<P>)

Functions

Link copied to clipboard
open infix fun responds(block: Consumer<R>)

Defines the expected response from the system in response to a completions request.

open infix override fun responds(block: suspend R.() -> Unit)
Link copied to clipboard
open infix fun <R : Any> respondsError(block: Consumer<ResponseDefinitionBuilder<P, R>>)

Specifies an erroneous response for a completions request.

open infix fun <T : Any> respondsError(block: suspend ResponseDefinitionBuilder<P, T>.() -> Unit)

Specifies an error response for a given request scenario. This allows defining the characteristics of an erroneous response, such as the HTTP status, response body, headers, delay, and more.

open fun <T : Any> respondsError(responseType: KClass<T>, block: suspend ResponseDefinitionBuilder<P, T>.() -> Unit)
Link copied to clipboard
open infix fun respondsStream(consumer: Consumer<R>)
abstract infix fun respondsStream(block: suspend R.() -> Unit)