TestProgressSession
class TestProgressSession<F : Failure> @JvmOverloads constructor(script: TestSessionScript<F>, id: UUID = UUID.randomUUID(), initialState: Session.State<F> = Pending, initialProgress: Progress = Progress()) : TestSession<F> , ProgressSession<F>
A controllable ProgressSession test double.
Progress listeners are invoked on the calling thread, and the current progress is delivered immediately when a listener is added. Use controller to drive progress updates alongside state transitions.
Constructors
Link copied to clipboard
constructor(script: TestSessionScript<F>, id: UUID = UUID.randomUUID(), initialState: Session.State<F> = Pending, initialProgress: Progress = Progress())
Properties
Link copied to clipboard
Returns the controller used to drive this session in tests.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Returns a snapshot of progress updates for this session.
Link copied to clipboard
Returns the current state of this session.
Link copied to clipboard
Returns a snapshot of state transitions for this session.
Functions
Link copied to clipboard
open override fun addProgressListener(subscriptionContainer: DisposableSubscriptionContainer, listener: ProgressSession.ProgressListener): DisposableSubscription
Link copied to clipboard
open override fun addStateListener(subscriptionContainer: DisposableSubscriptionContainer, listener: Session.StateListener<F>): DisposableSubscription
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Resets progress and progress history to the provided progress.