Class CacheAsserts
- java.lang.Object
-
- com.google.android.exoplayer2.testutil.CacheAsserts
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CacheAsserts.RequestSet
Defines a set of data requests.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
assertCachedData(Cache cache, CacheAsserts.RequestSet requestSet)
Asserts that the cache contains necessary data for therequestSet
.static void
assertCachedData(Cache cache, FakeDataSet fakeDataSet)
Asserts that the cache content is equal to the data in thefakeDataSet
.static void
assertCacheEmpty(Cache cache)
Asserts that the cache is empty.static void
assertDataCached(Cache cache, DataSpec dataSpec, byte[] expected)
Asserts that the cache contains the given data fordataSpec
.static void
assertReadData(DataSource dataSource, DataSpec dataSpec, byte[] expected)
Asserts that the read data fromdataSource
specified bydataSpec
is equal toexpected
or not.
-
-
-
Method Detail
-
assertCachedData
public static void assertCachedData(Cache cache, CacheAsserts.RequestSet requestSet) throws IOException
Asserts that the cache contains necessary data for therequestSet
.- Throws:
IOException
- If an error occurred reading from the Cache.
-
assertCachedData
public static void assertCachedData(Cache cache, FakeDataSet fakeDataSet) throws IOException
Asserts that the cache content is equal to the data in thefakeDataSet
.- Throws:
IOException
- If an error occurred reading from the Cache.
-
assertDataCached
public static void assertDataCached(Cache cache, DataSpec dataSpec, byte[] expected) throws IOException
Asserts that the cache contains the given data fordataSpec
.- Throws:
IOException
- If an error occurred reading from the Cache.
-
assertReadData
public static void assertReadData(DataSource dataSource, DataSpec dataSpec, byte[] expected) throws IOException
Asserts that the read data fromdataSource
specified bydataSpec
is equal toexpected
or not.- Throws:
IOException
- If an error occurred reading from the Cache.
-
assertCacheEmpty
public static void assertCacheEmpty(Cache cache)
Asserts that the cache is empty.
-
-