reset
Immediately resets the factory function to its default.
Samples
import dispatch.android.espresso.IdlingDispatcherProvider
import dispatch.android.lifecycle.LifecycleScopeFactory
import dispatch.android.lifecycle.MainImmediateContext
import dispatch.core.DispatcherProvider
import dispatch.internal.test.Application
import dispatch.internal.test.MyCustomElement
import dispatch.internal.test.Sample5
import kotlinx.coroutines.SupervisorJob
fun main() {
//sampleStart
class MyEspressoTest {
@Before
fun setUp() {
val dispatcherProvider = DispatcherProvider()
LifecycleScopeFactory.set {
SupervisorJob() + dispatcherProvider + dispatcherProvider.mainImmediate
}
}
@After
fun tearDown() {
LifecycleScopeFactory.reset()
}
}
//sampleEnd
}