Package dispatch.android.espresso

Types

Link copied to clipboard

Marker interface for an IdlingCoroutineScope which indicates that its CoroutineDispatcher is DispatcherProvider.default

Link copied to clipboard
interface IdlingCoroutineScope : CoroutineScope

Special CoroutineScope with a DispatcherProvider which is an IdlingDispatcherProvider.

Link copied to clipboard
class IdlingDispatcher(delegate: CoroutineDispatcher) : CoroutineDispatcher

IdlingResource helper for coroutines. This class simply wraps a delegate CoroutineDispatcher and keeps a running count of all coroutines it creates, decrementing the count when they complete.

Link copied to clipboard
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.

Link copied to clipboard
class IdlingDispatcherProviderRule(factory: () -> IdlingDispatcherProvider) : TestWatcher

A JUnit 4 TestRule which creates a new IdlingDispatcherProvider for each test, registering all IdlingDispatchers with IdlingRegistry before @Before and unregistering them after @After.

Link copied to clipboard
interface IOIdlingCoroutineScope : IdlingCoroutineScope, IOCoroutineScope

Marker interface for an IdlingCoroutineScope which indicates that its CoroutineDispatcher is DispatcherProvider.io

Link copied to clipboard
interface MainIdlingCoroutineScope : IdlingCoroutineScope, MainCoroutineScope

Marker interface for an IdlingCoroutineScope which indicates that its CoroutineDispatcher is DispatcherProvider.main

Link copied to clipboard

Marker interface for an IdlingCoroutineScope which indicates that its CoroutineDispatcher is DispatcherProvider.mainImmediate

Link copied to clipboard

Marker interface for an IdlingCoroutineScope which indicates that its CoroutineDispatcher is DispatcherProvider.unconfined

Functions

Link copied to clipboard
fun DefaultIdlingCoroutineScope(job: Job = SupervisorJob(), dispatcherProvider: IdlingDispatcherProvider = IdlingDispatcherProvider()): DefaultIdlingCoroutineScope

Factory function for a DefaultIdlingCoroutineScope.

Link copied to clipboard
fun IdlingCoroutineScope(job: Job = SupervisorJob(), dispatcherProvider: IdlingDispatcherProvider = IdlingDispatcherProvider()): IdlingCoroutineScope

Factory function for an IdlingCoroutineScope.

Link copied to clipboard
fun IdlingDispatcherProvider(delegate: DispatcherProvider = DefaultDispatcherProvider.get()): IdlingDispatcherProvider

IdlingDispatcherProvider factory function, which creates an instance using an existing DispatcherProvider.

Link copied to clipboard
fun IOIdlingCoroutineScope(job: Job = SupervisorJob(), dispatcherProvider: IdlingDispatcherProvider = IdlingDispatcherProvider()): IOIdlingCoroutineScope

Factory function for an IOIdlingCoroutineScope.

Link copied to clipboard
fun MainIdlingCoroutineScope(job: Job = SupervisorJob(), dispatcherProvider: IdlingDispatcherProvider = IdlingDispatcherProvider()): MainIdlingCoroutineScope

Factory function for a MainIdlingCoroutineScope.

Link copied to clipboard
fun MainImmediateIdlingCoroutineScope(job: Job = SupervisorJob(), dispatcherProvider: IdlingDispatcherProvider = IdlingDispatcherProvider()): MainImmediateIdlingCoroutineScope

Factory function for a MainImmediateIdlingCoroutineScope.

Link copied to clipboard
fun IdlingDispatcherProvider.registerAllIdlingResources()

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

Link copied to clipboard
fun UnconfinedIdlingCoroutineScope(job: Job = SupervisorJob(), dispatcherProvider: IdlingDispatcherProvider = IdlingDispatcherProvider()): UnconfinedIdlingCoroutineScope

Factory function for an UnconfinedIdlingCoroutineScope.

Link copied to clipboard

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