Android Studio Sign in

@UnstableApi
class CacheAsserts


Assertion methods for Cache.

Summary

Nested types

Defines a set of data requests.

Public functions

java-static Unit

Asserts that the cache is empty.

java-static Unit
assertCachedData(cache: Cache!, fakeDataSet: FakeDataSet!)

Asserts that the cache content is equal to the data in the fakeDataSet.

java-static Unit

Asserts that the cache contains necessary data for the requestSet.

java-static Unit
assertDataCached(cache: Cache!, dataSpec: DataSpec!, expected: ByteArray!)

Asserts that the cache contains the given data for dataSpec.

java-static Unit
assertReadData(
    dataSource: DataSource!,
    dataSpec: DataSpec!,
    expected: ByteArray!
)

Asserts that the read data from dataSource specified by dataSpec is equal to expected or not.

Public functions

assertCacheEmpty

java-static fun assertCacheEmpty(cache: Cache!): Unit

Asserts that the cache is empty.

assertCachedData

java-static fun assertCachedData(cache: Cache!, fakeDataSet: FakeDataSet!): Unit

Asserts that the cache content is equal to the data in the fakeDataSet.

Throws
java.io.IOException

If an error occurred reading from the Cache.

assertCachedData

java-static fun assertCachedData(cache: Cache!, requestSet: CacheAsserts.RequestSet!): Unit

Asserts that the cache contains necessary data for the requestSet.

Throws
java.io.IOException

If an error occurred reading from the Cache.

assertDataCached

java-static fun assertDataCached(cache: Cache!, dataSpec: DataSpec!, expected: ByteArray!): Unit

Asserts that the cache contains the given data for dataSpec.

Throws
java.io.IOException

If an error occurred reading from the Cache.

assertReadData

java-static fun assertReadData(
    dataSource: DataSource!,
    dataSpec: DataSpec!,
    expected: ByteArray!
): Unit

Asserts that the read data from dataSource specified by dataSpec is equal to expected or not.

Throws
java.io.IOException

If an error occurred reading from the Cache.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.