use of com.github.ignition.core.test.shadows.TestShadowProgressBar in project ignition by mttkay.
the class RemoteImageViewTest method testCorrectAttributeInflationAndDefaulting.
@Test
public void testCorrectAttributeInflationAndDefaulting() {
RemoteImageView imageView = (RemoteImageView) activity.findViewById(R.id.image1);
// default values for unsupplied attributes
assertTrue(imageView.isAutoLoad());
Drawable expectedErrorDrawable = Robolectric.application.getResources().getDrawable(RemoteImageView.DEFAULT_ERROR_DRAWABLE_RES_ID);
assertEquals(expectedErrorDrawable, imageView.getErrorDrawable());
Drawable expectedProgressDrawable = new TestShadowProgressBar().getIndeterminateDrawable();
assertEquals(expectedProgressDrawable, imageView.getProgressDrawable());
assertEquals("http://developer.android.com/images/home/android-design.png", imageView.getImageUrl());
}
Aggregations