InstantExecutorExtension

class InstantExecutorExtension : BeforeEachCallback, AfterEachCallback

Runs Architecture Components tasks synchronously in JUnit 5 tests.

This provides the JUnit 5 equivalent of AndroidX's JUnit 4 instant executor rule, making LiveData and related components deterministic in unit tests.

Based on https://jeroenmols.com/blog/2019/01/17/livedatajunit5/

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun afterEach(context: ExtensionContext)
Link copied to clipboard
open override fun beforeEach(context: ExtensionContext)