use of com.bumptech.glide.tests.Util.CreateBitmap in project glide by bumptech.
the class BitmapPreFillerTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
when(pool.getMaxSize()).thenReturn(poolSize);
when(pool.getDirty(anyInt(), anyInt(), any(Bitmap.Config.class))).thenAnswer(new CreateBitmap());
when(cache.getMaxSize()).thenReturn(cacheSize);
bitmapPreFiller = new BitmapPreFiller(cache, pool, DecodeFormat.DEFAULT);
}
use of com.bumptech.glide.tests.Util.CreateBitmap in project glide by bumptech.
the class BitmapPreFillRunnerTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
doAnswer(new AddBitmapPoolAnswer(addedBitmaps)).when(pool).put(any(Bitmap.class));
when(pool.getDirty(anyInt(), anyInt(), any(Bitmap.Config.class))).thenAnswer(new CreateBitmap());
when(cache.put(any(Key.class), anyResource())).thenAnswer(new AddBitmapCacheAnswer(addedBitmaps));
}
Aggregations