use of com.facebook.imagepipeline.cache.CountingLruBitmapMemoryCacheFactory in project fresco by facebook.
the class AnimatedFrameCacheTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
MemoryCacheParams params = new MemoryCacheParams(4 * ByteConstants.MB, 256, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, TimeUnit.MINUTES.toMillis(5));
when(mMemoryCacheParamsSupplier.get()).thenReturn(params);
CountingMemoryCache<CacheKey, CloseableImage> countingMemoryCache = new CountingLruBitmapMemoryCacheFactory().create(mMemoryCacheParamsSupplier, mMemoryTrimmableRegistry, new BitmapMemoryCacheTrimStrategy(), false, false, null);
mCacheKey = new SimpleCacheKey("key");
mAnimatedFrameCache = new AnimatedFrameCache(mCacheKey, countingMemoryCache);
mFrame1 = CloseableReference.of(mock(CloseableImage.class));
mFrame2 = CloseableReference.of(mock(CloseableImage.class));
}
Aggregations