IteratorEffectIdSource

An EffectIdSource that iterates through a fixed list of configured EffectIds. Throws NoSuchElementException when the list has been exceeded.

Useful for having controlled ids in tests.

val effectId = EffectId("1")
val store = Store(effectIdSource = IteratorEffectIdSource(listOf(effectId), /* ... */)

assertEquals(effectId, state.someEffectId)
store.dispatchAction(CancelLoad(effectId))

Parameters

ids

List of EffectIds that will be iterated over.

Constructors

Link copied to clipboard
constructor(ids: List<EffectId>)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun generateId(): EffectId