|
|
@ -30,7 +30,7 @@ import org.junit.runner.Description
|
|
|
|
* for the duration of the test.
|
|
|
|
* for the duration of the test.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
class MainDispatcherRule(
|
|
|
|
class MainDispatcherRule(
|
|
|
|
private val testDispatcher: TestDispatcher = UnconfinedTestDispatcher(),
|
|
|
|
val testDispatcher: TestDispatcher = UnconfinedTestDispatcher(),
|
|
|
|
) : TestWatcher() {
|
|
|
|
) : TestWatcher() {
|
|
|
|
override fun starting(description: Description) = Dispatchers.setMain(testDispatcher)
|
|
|
|
override fun starting(description: Description) = Dispatchers.setMain(testDispatcher)
|
|
|
|
|
|
|
|
|
|
|
|