AbstractTestIviDataSource

abstract class AbstractTestIviDataSource<E : Any, Q : Any>(val jumpingSupported: Boolean = true, val keyReuseSupported: Boolean = true) : IviDataSource<E, Q>

Base class for implementing an IviDataSource for testing purpose.

The implementation invokes pagingSourceFactory's PagingSourceFactory.create whenever a new IviPagingSource needs to be created. Creation of paging sources can be validated through the pagingSourceFactorySpy.

Constructors

Link copied to clipboard
fun AbstractTestIviDataSource(jumpingSupported: Boolean = true, keyReuseSupported: Boolean = true)

Types

Link copied to clipboard
interface PagingSourceFactory<E : Any, Q : Any>

Interface for factory to create an IviPagingSource.

Properties

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

Spies the access to the pagingSourceFactory.

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>>

Inheritors

Link copied to clipboard