BackgroundLayoutLooperRule

open class BackgroundLayoutLooperRule : TestRule

TestRule which allows a test to manually step through the default ComponentTree layout thread Looper while still executing those tasks on a background thread. Normal usage of ShadowLooper will execute on the calling thread, which in tests will execute code on the main thread.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open fun apply(base: Statement, description: Description): Statement
Link copied to clipboard
open fun runOneTaskSync()
Runs one task on the background thread, blocking until it completes.
Link copied to clipboard
Link copied to clipboard
Runs through all tasks on the background thread, blocking until it completes.