TestLifecycleScopeProvider
Test utility to create LifecycleScopeProvider instances for tests.
Supports a start and stop lifecycle. Subscribing when outside of the lifecycle will throw either a LifecycleNotStartedException or LifecycleEndedException.
Types
Link copied to clipboard
enum TestLifecycle
Functions
Link copied to clipboard
open fun correspondingEvents(): CorrespondingEventsFunction<TestLifecycleScopeProvider.TestLifecycle>
Returns a sequence of lifecycle events.
Link copied to clipboard
Returns a new TestLifecycleScopeProvider instance.
Link copied to clipboard
open fun createInitial(initialValue: TestLifecycleScopeProvider.TestLifecycle): TestLifecycleScopeProvider
Returns a new TestLifecycleScopeProvider instance with
initialValue
as its initial lifecycle event.Link copied to clipboard
Returns a sequence of lifecycle events.
Link copied to clipboard
Returns the last seen lifecycle event, or
null
if none.Link copied to clipboard