teller-android / com.levibostian.teller.testing.cachestate / LocalCacheStateTesting

LocalCacheStateTesting

class LocalCacheStateTesting

Convenient utility to generate instances of LocalCacheState used for testing purposes.

You can use this class directly, or, use the recommended extension functions in the LocalCacheState.Testing object.

Intentions of LocalCacheStateTesting:

  1. Be able to initialize an instance of LocalCacheState with 1 line of code.
  2. Immutable. Represent a snapshot of LocalCacheState without the ability to edit it.

Companion Object Functions

cache

fun <CACHE : Any> cache(requirements: GetCacheRequirements, cache: CACHE): LocalCacheState<CACHE>

isEmpty

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

none

fun <CACHE : Any> none(): LocalCacheState<CACHE>