kotest-assertions-core / io.kotest.matchers.channels / kotlinx.coroutines.channels.Channel

Extensions for kotlinx.coroutines.channels.Channel

shouldBeClosed

Asserts that this Channel is closed

fun <T> Channel<T>.shouldBeClosed(): Unit

shouldBeEmpty

Asserts that this Channel is empty

fun <T> Channel<T>.shouldBeEmpty(): Unit

shouldBeOpen

Asserts that this Channel is open

fun <T> Channel<T>.shouldBeOpen(): Unit

shouldHaveSize

Asserts that this Channel should receive n elements, then close

fun <T> Channel<T>.shouldHaveSize(n: Int): Unit

shouldReceiveAtLeast

Asserts that this Channel should receive at least n elements

fun <T> Channel<T>.shouldReceiveAtLeast(n: Int): Unit

shouldReceiveAtMost

Asserts that this Channel should receive at most n elements, then close

fun <T> Channel<T>.shouldReceiveAtMost(n: Int): Unit

shouldReceiveNoElementsWithin

Asserts that this Channel should not receive within duration

fun <T> Channel<T>.shouldReceiveNoElementsWithin(duration: Duration): Unit

shouldReceiveWithin

Asserts that this Channel should receive within duration

fun <T> Channel<T>.shouldReceiveWithin(duration: Duration): Unit