Package-level declarations

Types

Link copied to clipboard
class CoroutineTestRule(testDispatcher: TestDispatcher = UnconfinedTestDispatcher()) : TestWatcher

A JUnit Test Rule that sets the main coroutine dispatcher to a TestDispatcher for unit testing.

Link copied to clipboard

A custom runner used to set up a hilt instrumented test application.

Link copied to clipboard
class TestDispatchersProvider(testDispatcher: CoroutineDispatcher = UnconfinedTestDispatcher()) : DispatchersProvider

Test implementation of DispatchersProvider that provides a single test dispatcher for all coroutine contexts.

Functions

Link copied to clipboard
fun coVerifyNever(verifyBlock: suspend MockKVerificationScope.() -> Unit)

Verifies that a specific interaction with a mock object in a coroutine context never occurred.

Link copied to clipboard
fun <T> mockTask(result: T): Task<T>

Returns a mockk task with the given result

Link copied to clipboard
Link copied to clipboard
fun ComposeTestRule.onNodeWithIdentifier(identifier: TestIdentifier, suffix: String? = null, useUnmergedTree: Boolean = false): SemanticsNodeInteraction

Finds a semantics node identified by the given test identifier.

Link copied to clipboard
fun runTestUnconfined(testBody: suspend TestScope.() -> Unit)

A helper function to run a test using the UnconfinedTestDispatcher.

Link copied to clipboard
fun SpeziTestScope(context: CoroutineContext = UnconfinedTestDispatcher()): TestScope

Creates a new instance of TestScope with the provided CoroutineContext.

Link copied to clipboard
fun verifyNever(verifyBlock: MockKVerificationScope.() -> Unit)

Verifies that a specific interaction with a mock object never occurred.

Link copied to clipboard