use of com.octo.android.robospice.persistence.exception.CacheLoadingException in project robospice by stephanenicolas.
the class InFileBitmapObjectPersisterTest method testLoadDataFromCache_expired.
public void testLoadDataFromCache_expired() throws Exception {
testPersister.saveDataToCacheAndReturnData(TEST_BITMAP_LARGE, TEST_CACHE_KEY);
Thread.sleep(TEST_EXPIRATION_DURATION);
try {
Bitmap data = testPersister.loadDataFromCache(TEST_CACHE_KEY, TEST_EXPIRATION_DURATION);
assertNull(data);
} catch (CacheLoadingException e) {
fail("A cache miss should not throw exception ");
}
}
Aggregations