MockPlaybackStateRepo
class MockPlaybackStateRepo(createInitialState: () -> MockPlaybackState, coroutineContext: CoroutineContext) : BasePlaybackStateRepo
Mock implementation of BasePlaybackStateRepo This will only use MockPlaybackState
Parameters
createInitialState
method for creating an initial MockPlaybackState
coroutineContext
the CoroutineContext the CoroutineContext used to create a coroutine scope for this state machine.
Constructors
Link copied to clipboard
Constructor that initializes to a MockPlaybackState.Uninitialized State with a given MockPlaybackState.Configuration
Properties
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun launchTakeAndChangeState(context: CoroutineContext, action: suspend (PlaybackState) -> suspend () -> PlaybackState): Job
fun <K : PlaybackState> launchTakeAndChangeState(context: CoroutineContext, remainIfStateNot: KClass<K>, action: suspend (K) -> suspend () -> PlaybackState): Job
Link copied to clipboard
fun <Result> launchUseState(context: CoroutineContext, action: suspend (PlaybackState) -> Result): Job
Link copied to clipboard
Link copied to clipboard
suspend fun takeAndChangeState(action: suspend (PlaybackState) -> suspend () -> PlaybackState): PlaybackState
suspend fun <K : PlaybackState> takeAndChangeState(remainIfStateNot: KClass<K>, action: suspend (K) -> suspend () -> PlaybackState): PlaybackState