use of org.junit.Before in project glide by bumptech.
the class FitCenterTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
bitmapWidth = 100;
bitmapHeight = 100;
Bitmap bitmap = Bitmap.createBitmap(bitmapWidth, bitmapHeight, Bitmap.Config.ARGB_8888);
when(resource.get()).thenReturn(bitmap);
pool = new BitmapPoolAdapter();
fitCenter = new FitCenter(pool);
}
use of org.junit.Before 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 org.junit.Before in project glide by bumptech.
the class ByteArrayLoaderTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
loader = new ByteArrayLoader<>(converter);
options = new Options();
}
use of org.junit.Before in project glide by bumptech.
the class UriLoaderTest method setUp.
@Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
options = new Options();
loader = new UriLoader<>(factory);
}
use of org.junit.Before in project glide by bumptech.
the class ResourceLoaderTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
options = new Options();
loader = new ResourceLoader<>(RuntimeEnvironment.application.getResources(), uriLoader);
}
Aggregations