TestMosaic
Assertions and ordinary Mosaic composition within TestMosaicBuilder.withMosaic. This receiver delegates to the scoped runtime and owns no coroutine engine. Do not retain it after the execution block returns.
Functions
Link copied to clipboard
Asserts that a Tile returns the expected value.
suspend fun <K : Any, V> assertEquals(tile: MultiTile<K, V>, keys: Collection<K>, expected: Map<K, V>)
Asserts that a MultiTile returns the expected values for the given keys.
Asserts that a Tile returns the expected value with a custom failure message.
suspend fun <K : Any, V> assertEquals(tile: MultiTile<K, V>, keys: List<K>, expected: Map<K, V>, message: String)
Asserts that a MultiTile returns the expected values for the given keys with a custom failure message.
Link copied to clipboard
Asserts that a Tile throws the expected exception when retrieved.
suspend fun <K : Any> assertThrows(tile: MultiTile<K, *>, keys: List<K>, expectedException: KClass<out Throwable>): Throwable
Asserts that a MultiTile throws the expected exception when retrieved with the given keys.
suspend fun assertThrows(tile: Tile<*>, expectedException: KClass<out Throwable>, message: String): Throwable
Asserts that a Tile throws the expected exception with a custom failure message.
Link copied to clipboard