TestCaseBase

abstract class TestCaseBase

Constructors

Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
@ExperimentalCoroutinesApi
var coroutinesTestRule: CoroutineTestRule
Link copied to clipboard
val watcher: TestRule

Functions

Link copied to clipboard
Link copied to clipboard
fun configure()
Link copied to clipboard
fun <T> LiveData<T>.getOrAwaitValue(time: Long = 2, timeUnit: TimeUnit = TimeUnit.SECONDS): T

Observes a LiveData value until it receives a new value, returning that new value when it gets one unless the timeout is reached.

Link copied to clipboard
@ExperimentalCoroutinesApi
fun mockMainScope(): CoroutineScope

Helper function for mocking MainScope and use TestCoroutineScope as CoroutineScope.