Add code documentation.

Change-Id: Idb9fe56112f3764a1d20ae7499b8e9be37674188
pull/1238/head
Jaehwa Noh 2 years ago
parent 79b7df7b8e
commit 09a5cd8695

@ -30,6 +30,10 @@ import org.junit.runner.Description
* for the duration of the test. * for the duration of the test.
*/ */
class MainDispatcherRule( class MainDispatcherRule(
/**
* Expose testDispatcher to share the scheduler to the test.
* See more in [Documentation](https://developer.android.com/kotlin/coroutines/test#injecting-test-dispatchers)
*/
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)

Loading…
Cancel
Save