TestSession
open class TestSession<F : Failure> @JvmOverloads constructor(script: TestSessionScript<F> = TestSessionScript.auto(Session.State.Succeeded), val id: UUID = UUID.randomUUID(), initialState: Session.State<F> = Pending) : Session<F>
A controllable Session test double.
State listeners are invoked on the calling thread, and the current state is delivered immediately when a listener is added. Use controller to drive state transitions directly or script transitions tied to Session.launch and Session.commit calls with TestSessionScript.
Inheritors
Constructors
Link copied to clipboard
constructor(script: TestSessionScript<F> = TestSessionScript.auto(Session.State.Succeeded), id: UUID = UUID.randomUUID(), initialState: Session.State<F> = Pending)
Properties
Functions
Link copied to clipboard
open override fun addStateListener(subscriptionContainer: DisposableSubscriptionContainer, listener: Session.StateListener<F>): DisposableSubscription
Link copied to clipboard
Link copied to clipboard
Resets state and state history to the provided state.