teller-android / com.levibostian.teller.testing.extensions

Package com.levibostian.teller.testing.extensions

Functions

cache

fun <CACHE : Any> Testing.cache(requirements: GetCacheRequirements, cache: CACHE): LocalCacheState<CACHE>
fun <CACHE> Testing.cache(requirements: GetCacheRequirements, lastTimeFetched: Date, more: CacheExistsDsl<CACHE>.() -> Unit = null): OnlineCacheState<CACHE>

failure

fun Testing.failure(error: Throwable): RefreshResult

initState

fun <CACHE, REQ : GetCacheRequirements, FETCH_RESPONSE> Testing.initState(repository: OnlineRepository<CACHE, REQ, FETCH_RESPONSE>, requirements: REQ, more: StateOfOnlineRepositoryDsl<FETCH_RESPONSE>.() -> Unit = null): SetValues

initStateAsync

fun <FETCH_RESPONSE, REPO : OnlineRepository<*, GetCacheRequirements, FETCH_RESPONSE>> Testing.initStateAsync(repository: REPO, requirements: GetCacheRequirements, more: StateOfOnlineRepositoryDsl<FETCH_RESPONSE>.() -> Unit = null, complete: (SetValues) -> Unit): Unit

isEmpty

fun <CACHE : Any> Testing.isEmpty(requirements: GetCacheRequirements): LocalCacheState<CACHE>

noCache

fun <CACHE> Testing.noCache(requirements: GetCacheRequirements, more: NoCacheExistsDsl.() -> Unit = null): OnlineCacheState<CACHE>

none

fun <CACHE : Any> Testing.none(): LocalCacheState<CACHE>
fun <CACHE> Testing.none(): OnlineCacheState<CACHE>

skipped

fun Testing.skipped(reason: SkippedReason): RefreshResult

success

fun Testing.success(): RefreshResult