CacheAsserts
@UnstableApi
public final class CacheAsserts
Assertion methods for Cache.
Summary
Nested types |
|---|
public final class CacheAsserts.RequestSetDefines a set of data requests. |
Public methods |
|
|---|---|
static void |
assertCacheEmpty(Cache cache)Asserts that the cache is empty. |
static void |
assertCachedData(Cache cache, FakeDataSet fakeDataSet)Asserts that the cache content is equal to the data in the |
static void |
assertCachedData(Cache cache, CacheAsserts.RequestSet requestSet)Asserts that the cache contains necessary data for the |
static void |
assertDataCached(Cache cache, DataSpec dataSpec, byte[] expected)Asserts that the cache contains the given data for |
static void |
assertReadData(Asserts that the read data from |
Public methods
assertCachedData
public static void assertCachedData(Cache cache, FakeDataSet fakeDataSet)
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
public static void assertCachedData(Cache cache, CacheAsserts.RequestSet requestSet)
Asserts that the cache contains necessary data for the requestSet.
| Throws | |
|---|---|
java.io.IOException |
If an error occurred reading from the Cache. |
assertDataCached
public static void assertDataCached(Cache cache, DataSpec dataSpec, byte[] expected)
Asserts that the cache contains the given data for dataSpec.
| Throws | |
|---|---|
java.io.IOException |
If an error occurred reading from the Cache. |
assertReadData
public static void assertReadData(
DataSource dataSource,
DataSpec dataSpec,
byte[] expected
)
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. |