예제 #1
0
 @Test
 public void testWasSelfInvalidated() throws Exception {
   Drawable drawable = ShadowDrawable.createFromResourceId(34758);
   ShadowDrawable shadowDrawable = shadowOf(drawable);
   assertThat(shadowDrawable.wasInvalidated()).isFalse();
   drawable.invalidateSelf();
   assertThat(shadowDrawable.wasInvalidated()).isTrue();
 }
예제 #2
0
 @Test
 public void testCreateFromResourceId_shouldSetTheId() throws Exception {
   Drawable drawable = ShadowDrawable.createFromResourceId(34758);
   ShadowDrawable shadowDrawable = shadowOf(drawable);
   assertThat(shadowDrawable.getLoadedFromResourceId()).isEqualTo(34758);
 }