Search in sources :

Example 61 with Before

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);
}
Also used : Bitmap(android.graphics.Bitmap) BitmapPoolAdapter(com.bumptech.glide.load.engine.bitmap_recycle.BitmapPoolAdapter) Before(org.junit.Before)

Example 62 with Before

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);
}
Also used : CreateBitmap(com.bumptech.glide.tests.Util.CreateBitmap) Config(org.robolectric.annotation.Config) Before(org.junit.Before)

Example 63 with Before

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();
}
Also used : Options(com.bumptech.glide.load.Options) Before(org.junit.Before)

Example 64 with Before

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);
}
Also used : Options(com.bumptech.glide.load.Options) Before(org.junit.Before)

Example 65 with Before

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);
}
Also used : Options(com.bumptech.glide.load.Options) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)10105 File (java.io.File)829 Properties (java.util.Properties)286 Configuration (org.apache.hadoop.conf.Configuration)282 ArrayList (java.util.ArrayList)256 TreeMap (java.util.TreeMap)247 HashMap (java.util.HashMap)196 IOException (java.io.IOException)175 URL (java.net.URL)167 Path (org.apache.hadoop.fs.Path)144 TableHelper (org.apache.cayenne.test.jdbc.TableHelper)132 InputStream (java.io.InputStream)119 Config (com.hazelcast.config.Config)115 HazelcastInstance (com.hazelcast.core.HazelcastInstance)111 InvocationOnMock (org.mockito.invocation.InvocationOnMock)111 MockHttpServletRequest (org.springframework.mock.web.MockHttpServletRequest)106 Date (java.util.Date)105 ByteArrayOutputStream (java.io.ByteArrayOutputStream)96 YarnConfiguration (org.apache.hadoop.yarn.conf.YarnConfiguration)90 Random (java.util.Random)82