ResponseReceiver

class ResponseReceiver<RES : PortResponse>(val response: RES)

A receiver for a PortResponse that allows for pattern matching on the response type.

Since

1.0.0

Parameters

RES

The type of PortResponse that this receiver can handle.

Constructors

Link copied to clipboard
constructor(response: RES)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
inline fun <T : RES> expects(noinline block: ResponseReceiver<T>.() -> Unit)
fun <T : RES> expects(responseClass: KClass<T>, block: ResponseReceiver<T>.() -> Unit)

Handles the response if it is of the given type.

Link copied to clipboard

Handles the response if it has not been handled by an expects block.