@DoNotMock("Use TestLifecycleScopeProvider instead") interface LifecycleScopeProvider<E : Any> : ScopeProvider
A convenience interface that, when implemented, helps provide information to create implementations that resolve the next corresponding lifecycle event and construct a Completable representation of it from the #lifecycle() stream.
Convenience resolver utilities for this can be found in LifecycleScopes.
See Also
LifecycleScopes
abstract fun correspondingEvents(): CorrespondingEventsFunction<E> |
|
abstract fun lifecycle(): Observable<E> |
|
abstract fun peekLifecycle(): E? |
|
open fun requestScope(): CompletableSource |
class TestLifecycleScopeProvider : LifecycleScopeProvider<TestLifecycle>
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. |