use of org.robolectric.fakes.RoboMenuItem in project android_packages_apps_Settings by omnirom.
the class ManageApplicationsTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mAppReset = new RoboMenuItem(R.id.reset_app_preferences);
ReflectionHelpers.setStaticField(ApplicationsState.class, "sInstance", mState);
when(mState.newSession(any())).thenReturn(mSession);
mBgLooper = Looper.myLooper();
when(mState.getBackgroundLooper()).thenReturn(mBgLooper);
mFragment = new ManageApplications();
ReflectionHelpers.setField(mFragment, "mLifecycle", new Lifecycle());
}
use of org.robolectric.fakes.RoboMenuItem in project android_packages_apps_Settings by SudaMod.
the class ManageApplicationsTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mAppReset = new RoboMenuItem(R.id.reset_app_preferences);
ReflectionHelpers.setStaticField(ApplicationsState.class, "sInstance", mState);
when(mState.newSession(any())).thenReturn(mSession);
mBgLooper = Looper.myLooper();
when(mState.getBackgroundLooper()).thenReturn(mBgLooper);
mFragment = new ManageApplications();
ReflectionHelpers.setField(mFragment, "mLifecycle", new Lifecycle());
}
use of org.robolectric.fakes.RoboMenuItem in project android_packages_apps_Settings by DirtyUnicorns.
the class ManageApplicationsTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mAppReset = new RoboMenuItem(R.id.reset_app_preferences);
ReflectionHelpers.setStaticField(ApplicationsState.class, "sInstance", mState);
when(mState.newSession(any())).thenReturn(mSession);
mBgLooper = Looper.myLooper();
when(mState.getBackgroundLooper()).thenReturn(mBgLooper);
mFragment = new ManageApplications();
ReflectionHelpers.setField(mFragment, "mLifecycle", new Lifecycle());
}
use of org.robolectric.fakes.RoboMenuItem in project Detours-Android by TeamDetours.
the class Cafe_NavDrawer_ActivityTest method onNavigationItemSelected_ElseIsFalse.
@Test
public void onNavigationItemSelected_ElseIsFalse() throws Exception {
MenuItem menuItem = new RoboMenuItem(R.id.ratings_asc);
assertFalse(cafeActivity.onNavigationItemSelected(menuItem));
}
use of org.robolectric.fakes.RoboMenuItem in project Detours-Android by TeamDetours.
the class Cafe_NavDrawer_ActivityTest method onNavigationItemSelected_RatingsIsTrue.
@Test
public void onNavigationItemSelected_RatingsIsTrue() throws Exception {
MenuItem menuItem = new RoboMenuItem(R.id.nav_Rating3AndUp);
assertTrue(cafeActivity.onNavigationItemSelected(menuItem));
}
Aggregations