Search in sources :

Example 1 with IntentService

use of android.app.IntentService in project robolectric by robolectric.

the class ShadowIntentServiceTest method shouldSetIntentRedelivery.

@Test
public void shouldSetIntentRedelivery() {
    IntentService intentService = new TestIntentService();
    ShadowIntentService shadowIntentService = shadowOf(intentService);
    assertThat(shadowIntentService.getIntentRedelivery()).isFalse();
    intentService.setIntentRedelivery(true);
    assertThat(shadowIntentService.getIntentRedelivery()).isTrue();
    intentService.setIntentRedelivery(false);
    assertThat(shadowIntentService.getIntentRedelivery()).isFalse();
}
Also used : IntentService(android.app.IntentService) Test(org.junit.Test)

Aggregations

IntentService (android.app.IntentService)1 Test (org.junit.Test)1