InstantTaskExecutorRule

class InstantTaskExecutorRule : TestWatcher


A JUnit Test Rule that swaps the background executor used by the Architecture Components with a different one which executes each task synchronously.

You can use this rule for your host side tests that use Architecture Components.

Summary

Public constructors

Protected functions

Unit
finished(description: Description!)
Unit
starting(description: Description!)

Inherited functions

From org.junit.rules.TestWatcher
Statement!
apply(base: Statement!, description: Description!)
Unit
failed(e: Throwable!, description: Description!)
Unit
Unit
succeeded(description: Description!)

Public constructors

InstantTaskExecutorRule

Added in 2.0.0
InstantTaskExecutorRule()

Protected functions

finished

protected fun finished(description: Description!): Unit

starting

protected fun starting(description: Description!): Unit