FileDocCategorySizeDatePackage
NetworkImageViewTest.javaAPI DocAndroid 5.1 API1621Thu Mar 12 22:22:56 GMT 2015com.android.volley.toolbox

NetworkImageViewTest

public class NetworkImageViewTest extends android.test.InstrumentationTestCase

Fields Summary
private NetworkImageView
mNIV
private MockImageLoader
mMockImageLoader
Constructors Summary
Methods Summary
protected voidsetUp()

        super.setUp();
        mMockImageLoader = new MockImageLoader();
        mNIV = new NetworkImageView(getInstrumentation().getContext());
    
public voidtestSetImageUrl_requestsImage()

        mNIV.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
        mNIV.setImageUrl("http://foo", mMockImageLoader);
        assertEquals("http://foo", mMockImageLoader.lastRequestUrl);
        assertEquals(0, mMockImageLoader.lastMaxWidth);
        assertEquals(0, mMockImageLoader.lastMaxHeight);