FlowTest

abstract class FlowTest<T, F : Flow<T>>(scope: CoroutineScope = MainScope()) : BaseFlowTest<Unit, BaseUIThreadTest.EmptyTestContext, T, F>

Inheritors

Constructors

Link copied to clipboard
constructor(scope: CoroutineScope = MainScope())

Properties

Link copied to clipboard
Link copied to clipboard
open override val createTestContextWithConfiguration: suspend (configuration: Unit, scope: CoroutineScope) -> BaseUIThreadTest.EmptyTestContext

Creates the TestContext based on Configuration and CoroutineScope

Link copied to clipboard
open val filter: (Flow<T>) -> Flow<T>
Link copied to clipboard
Link copied to clipboard
abstract val flow: suspend () -> F
Link copied to clipboard
Link copied to clipboard
var job: Job?
Link copied to clipboard
Link copied to clipboard
val scope: CoroutineScope

Functions

Link copied to clipboard
suspend fun action(action: ActionBlock)
Link copied to clipboard
open override fun afterTest()
Link copied to clipboard
expect open fun beforeTest()
Link copied to clipboard
Link copied to clipboard
suspend fun resetFlow()
Link copied to clipboard
suspend fun test(skip: Int = 0, test: TestBlock<BaseUIThreadTest.EmptyTestContext, T>)
Link copied to clipboard
fun testOnUIThread(configuration: Unit, cancelScopeAfterTest: Boolean = false, block: suspend BaseUIThreadTest.EmptyTestContext.() -> Unit)

Run your test block on the UI thread and inside the TestContext.

Link copied to clipboard
Link copied to clipboard
fun testWithFlowAndTestContext(configuration: Unit, createFlowInMainScope: Boolean = true, retainContextAfterTest: Boolean = false, blockWithContext: FlowTestBlockWithContext<Unit, BaseUIThreadTest.EmptyTestContext, T, F>)