DataTransformer

class DataTransformer<D : Transmission.Data?>(contract: Contract.DataHolder<D>, data: () -> D, coroutineDispatcher: CoroutineDispatcher) : Transformer(source)

Constructors

Link copied to clipboard
constructor(contract: Contract.DataHolder<D>, data: () -> D, coroutineDispatcher: CoroutineDispatcher)

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
fun clear()
Link copied to clipboard
open fun onCleared()
Link copied to clipboard
open fun onError(throwable: Throwable)
Link copied to clipboard
fun Transformer.test(dispatcher: CoroutineDispatcher = StandardTestDispatcher()): TransmissionTest

Extension function to create a TransmissionTest for this transformer.

Extension function to create a TransmissionTest for this transformer with a custom dispatcher.

fun Transformer.test(dispatcher: TestDispatcher = StandardTestDispatcher(), timeout: Duration = 5.seconds, block: suspend TransmissionTestScope.() -> Unit): TestResult

Tests this transformer by sending messages and awaiting what it produces.

Link copied to clipboard

Waits for the transformer's current signal and effect processing to complete.