SimpleTestIviDataSource

class SimpleTestIviDataSource<E : Any, Q : Any>(    dataByQuery: Map<Q, List<E>>,     jumpingSupported: Boolean = true,     keyReuseSupported: Boolean = true) : AbstractTestIviDataSource<E, Q>

An IviDataSource, for testing purpose, that creates IviPagingSources that allows loading of a predefined data list. The IviPagingSource allows loading of data from an dataByQuery entry. The data is loaded from the entry with a key that equals the query argument given to createPagingSource or createPagingSourceFlow.

Constructors

Link copied to clipboard
fun <E : Any, Q : Any> SimpleTestIviDataSource(    dataByQuery: Map<Q, List<E>>,     jumpingSupported: Boolean = true,     keyReuseSupported: Boolean = true)

Inherited properties

Link copied to clipboard
override val jumpingSupported: Boolean
Link copied to clipboard
override val keyReuseSupported: Boolean
Link copied to clipboard

Spies the access to the pagingSourceFactory.

Inherited functions

Link copied to clipboard
override fun createPagingSource(query: Q, lifecycleOwner: LifecycleOwner): IviPagingSource<E>
Link copied to clipboard
override fun createPagingSourceFlow(query: Q): Flow<IviPagingSource<E>>