BaseFlowTest

abstract class BaseFlowTest<Configration, Context : BaseUIThreadTest.TestContext, T, F : Flow<T>>(val scope: CoroutineScope = MainScope(), val logger: Logger? = null) : BaseUIThreadTest<Configration, Context> , CoroutineScope

Inheritors

Constructors

Link copied to clipboard
constructor(scope: CoroutineScope = MainScope(), logger: Logger? = null)

Properties

Link copied to clipboard
Link copied to clipboard
abstract val createTestContextWithConfiguration: suspend (configuration: Configration, scope: CoroutineScope) -> Context

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 flowFromTestContext: suspend Context.() -> F
Link copied to clipboard
var job: Job?
Link copied to clipboard
val logger: Logger? = null
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
suspend fun mainAction(action: ScopeActionBlock<Context>)
Link copied to clipboard
suspend fun resetFlow()
Link copied to clipboard
suspend fun test(skip: Int = 0, test: TestBlock<Context, T>)
Link copied to clipboard
fun testOnUIThread(configuration: Configration, cancelScopeAfterTest: Boolean = false, block: suspend Context.() -> Unit)

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

Link copied to clipboard
fun testWithFlowAndTestContext(configuration: Configration, createFlowInMainScope: Boolean = true, retainContextAfterTest: Boolean = false, blockWithContext: FlowTestBlockWithContext<Configration, Context, T, F>)