Esempio n. 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();
 }
Esempio n. 2
0
 @Test
 public void testCreateFromResourceId_shouldSetTheId() throws Exception {
   Drawable drawable = ShadowDrawable.createFromResourceId(34758);
   ShadowDrawable shadowDrawable = shadowOf(drawable);
   assertThat(shadowDrawable.getLoadedFromResourceId()).isEqualTo(34758);
 }