use of com.android.settings.testutils.shadow.ShadowUserManager in project android_packages_apps_Settings by omnirom.
the class AccountDetailDashboardFragmentTest method onResume_accountPresentOneProfile_shouldNotFinish.
@Test
public void onResume_accountPresentOneProfile_shouldNotFinish() {
ShadowUserManager userManager = Shadow.extract(mContext.getSystemService(UserManager.class));
userManager.addUserProfile(new UserHandle(1));
ShadowAccountManager.addAccountForUser(1, mFragment.mAccount);
mFragment.finishIfAccountMissing();
verify(mFragment, never()).finish();
}
use of com.android.settings.testutils.shadow.ShadowUserManager in project android_packages_apps_Settings by omnirom.
the class AccountDetailDashboardFragmentTest method onResume_accountPresentTwoProfiles_shouldNotFinish.
@Test
public void onResume_accountPresentTwoProfiles_shouldNotFinish() {
ShadowUserManager userManager = Shadow.extract(mContext.getSystemService(UserManager.class));
userManager.addUserProfile(new UserHandle(1));
userManager.addUserProfile(new UserHandle(2));
ShadowAccountManager.addAccountForUser(1, new Account("test@test.com", "com.test"));
ShadowAccountManager.addAccountForUser(2, mFragment.mAccount);
mFragment.finishIfAccountMissing();
verify(mFragment, never()).finish();
}
Aggregations