@@ -0,0 +1,1621 @@
+package com.android.volley.toolbox;%0A%0Aimport android.test.InstrumentationTestCase;%0Aimport android.view.ViewGroup.LayoutParams;%0A%0Apublic class NetworkImageViewTest extends InstrumentationTestCase %7B%0A    private NetworkImageView mNIV;%0A    private MockImageLoader mMockImageLoader;%0A%0A    @Override%0A    protected void setUp() throws Exception %7B%0A        super.setUp();%0A        mMockImageLoader = new MockImageLoader();%0A        mNIV = new NetworkImageView(getInstrumentation().getContext());%0A    %7D%0A%0A    public void testSetImageUrl_requestsImage() %7B%0A        mNIV.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));%0A        mNIV.setImageUrl(%22http://foo%22, mMockImageLoader);%0A        assertEquals(%22http://foo%22, mMockImageLoader.lastRequestUrl);%0A        assertEquals(0, mMockImageLoader.lastMaxWidth);%0A        assertEquals(0, mMockImageLoader.lastMaxHeight);%0A    %7D%0A%0A    // public void testSetImageUrl_setsMaxSize() %7B%0A    // // TODO: Not sure how to make getWidth() return something from an%0A    // // instrumentation test. Write this test once it's figured out.%0A    // %7D%0A%0A    private class MockImageLoader extends ImageLoader %7B%0A        public MockImageLoader() %7B%0A            super(null, null);%0A        %7D%0A%0A        public String lastRequestUrl;%0A        public int lastMaxWidth;%0A        public int lastMaxHeight;%0A%0A        public ImageContainer get(String requestUrl, ImageListener imageListener, int maxWidth,%0A                int maxHeight) %7B%0A            lastRequestUrl = requestUrl;%0A            lastMaxWidth = maxWidth;%0A            lastMaxHeight = maxHeight;%0A            return null;%0A        %7D%0A    %7D%0A%7D%0A

Add a basic test for NetworkImageView