Package-level declarations

Types

Link copied to clipboard
class MainDispatcherExtension(val dispatcher: TestDispatcher = StandardTestDispatcher()) : BeforeEachCallback, AfterEachCallback

A JUnit 5 extension that replaces Dispatchers.Main with dispatcher for each test and always restores it afterward.

Link copied to clipboard
class MainDispatcherRule(val dispatcher: TestDispatcher = StandardTestDispatcher()) : TestWatcher

A JUnit 4 rule that replaces Dispatchers.Main with dispatcher for each test and always restores it afterward, including when the test fails.