TestProvidedCoroutineScope

@ExperimentalCoroutinesApi
fun TestProvidedCoroutineScope(dispatcher: TestCoroutineDispatcher = TestCoroutineDispatcher(), dispatcherProvider: TestDispatcherProvider = TestDispatcherProvider(dispatcher), context: CoroutineContext = EmptyCoroutineContext): TestProvidedCoroutineScope

Creates a TestProvidedCoroutineScope implementation with optional parameters of TestCoroutineDispatcher, TestDispatcherProvider, and a generic CoroutineContext.

The resultant TestProvidedCoroutineScope will utilize a single TestCoroutineDispatcher for all the CoroutineDispatcher properties of its DispatcherProvider, and the ContinuationInterceptor Key of the CoroutineContext will also return that TestCoroutineDispatcher.

Sources

Link copied to clipboard