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