Coroutines Test
interface CoroutinesTest
Content copied to clipboard
An interface meant to be implemented by a Test Suite that uses Complex Concurrency via Coroutines. Example:
class MyClassTest : CoroutinesTest {
@Test
fun `some test`() = coroutinesTest {
// testing structured concurrency here!
}
}It provides a CoroutinesTestRule and alternative dispatchers.
Author
Davide Farella
Functions
coroutinesTest
Link copied to clipboard
open fun coroutinesTest(context: CoroutineContext = dispatchers.Main, block: suspend TestCoroutineScope.() -> Unit)
Content copied to clipboard
Properties
compDispatcher
Link copied to clipboard
coroutinesRule
Link copied to clipboard
dispatchers
Link copied to clipboard
ioDispatcher
Link copied to clipboard
mainDispatcher
Link copied to clipboard