IdlingDispatcherProvider

class IdlingDispatcherProvider(default: IdlingDispatcher, io: IdlingDispatcher, main: IdlingDispatcher, mainImmediate: IdlingDispatcher, unconfined: IdlingDispatcher) : DispatcherProvider

IdlingResource helper for coroutines. This DispatcherProvider implementation utilizes an IdlingDispatcher for each CoroutineDispatcher.

See also

androidx.test.espresso.IdlingResource
kotlinx.coroutines.CoroutineDispatcher

Constructors

Link copied to clipboard
fun IdlingDispatcherProvider(default: IdlingDispatcher, io: IdlingDispatcher, main: IdlingDispatcher, mainImmediate: IdlingDispatcher, unconfined: IdlingDispatcher)

Functions

Link copied to clipboard
open override fun copy(default: CoroutineDispatcher, io: CoroutineDispatcher, main: CoroutineDispatcher, mainImmediate: CoroutineDispatcher, unconfined: CoroutineDispatcher): IdlingDispatcherProvider
Link copied to clipboard
open override fun <R> fold(initial: R, operation: (R, CoroutineContext.Element) -> R): R
Link copied to clipboard
open operator override fun <E : CoroutineContext.Element> get(key: CoroutineContext.Key<E>): E?
Link copied to clipboard
open override fun minusKey(key: CoroutineContext.Key<*>): CoroutineContext
Link copied to clipboard
open operator fun plus(context: CoroutineContext): CoroutineContext

Properties

Link copied to clipboard
open override val default: IdlingDispatcher

IdlingDispatcher implementation of DispatcherProvider.default, which typically corresponds to the Dispatchers.Default.

Link copied to clipboard
open override val io: IdlingDispatcher

IdlingDispatcher implementation of DispatcherProvider.io, which typically corresponds to the Dispatchers.IO.

Link copied to clipboard
open override val key: CoroutineContext.Key<*>
Link copied to clipboard
open override val main: IdlingDispatcher

IdlingDispatcher implementation of DispatcherProvider.main, which typically corresponds to the Dispatchers.Main.

Link copied to clipboard
open override val mainImmediate: IdlingDispatcher

IdlingDispatcher implementation of DispatcherProvider.mainImmediate, which typically corresponds to the Dispatchers.Main.immediateCoroutineDispatcher.

Link copied to clipboard
open override val unconfined: IdlingDispatcher

IdlingDispatcher implementation of DispatcherProvider.unconfined, which typically corresponds to the Dispatchers.Unconfined.

Extensions

Link copied to clipboard
fun IdlingDispatcherProvider.registerAllIdlingResources()

Register all IdlingDispatcher properties of the receiver IdlingDispatcherProvider with Espresso's IdlingRegistry.

Link copied to clipboard

Unregister all IdlingDispatcher properties of the receiver IdlingDispatcherProvider with Espresso's IdlingRegistry.

Sources

Link copied to clipboard