use of android.app.ActivityManager.AppTask in project robolectric by robolectric.
the class ShadowAppTaskTest method setExcludeFromRecents_excludesFromRecents.
@Test
public void setExcludeFromRecents_excludesFromRecents() {
final AppTask appTask = ShadowAppTask.newInstance();
appTask.setExcludeFromRecents(true);
assertThat(shadowOf(appTask).isExcludedFromRecents()).isTrue();
}
use of android.app.ActivityManager.AppTask in project robolectric by robolectric.
the class ShadowActivityManagerTest method getAppTasks_shouldReturnAppTaskList.
@Test
@Config(minSdk = LOLLIPOP)
public void getAppTasks_shouldReturnAppTaskList() {
final AppTask task1 = ShadowAppTask.newInstance();
final AppTask task2 = ShadowAppTask.newInstance();
assertThat(activityManager.getAppTasks()).isEmpty();
shadowActivityManager.setAppTasks(Lists.newArrayList(task1, task2));
assertThat(activityManager.getAppTasks()).containsExactly(task1, task2);
}
Aggregations