android-components / mozilla.components.support.test.rule / MainCoroutineRule

MainCoroutineRule

@ExperimentalCoroutinesApi class MainCoroutineRule : TestWatcher (source)

JUnit rule to change Dispatchers.Main in coroutines.

Constructors

Name Summary
<init> MainCoroutineRule(testDispatcher: CoroutineDispatcher = createTestCoroutinesDispatcher())
JUnit rule to change Dispatchers.Main in coroutines.

Properties

Name Summary
testDispatcher val testDispatcher: CoroutineDispatcher

Functions

Name Summary
finished fun finished(description: Description?): Unit
starting fun starting(description: Description?): Unit

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.