CacheAsserts
@UnstableApi
class CacheAsserts
Assertion methods for Cache.
Summary
Nested types |
|---|
class CacheAsserts.RequestSetDefines a set of data requests. |
Public functions |
|
|---|---|
java-static Unit |
assertCacheEmpty(cache: Cache!)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 |
java-static Unit |
assertCachedData(cache: Cache!, requestSet: CacheAsserts.RequestSet!)Asserts that the cache contains necessary data for the |
java-static Unit |
assertDataCached(cache: Cache!, dataSpec: DataSpec!, expected: ByteArray!)Asserts that the cache contains the given data for |
java-static Unit |
assertReadData(Asserts that the read data from |
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. |