Home
last modified time | relevance | path

Searched refs:mMockProfileHelper (Results 1 – 11 of 11) sorted by relevance

/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/accounts/
DAccountGroupPreferenceControllerTest.java70 private ProfileHelper mMockProfileHelper; field in AccountGroupPreferenceControllerTest
92 when(mMockProfileHelper.isCurrentProcessUser(userInfo)).thenReturn(true); in getAvailabilityStatus_currentUser_noRestriction_available()
93 when(mMockProfileHelper.canCurrentProcessModifyAccounts()).thenReturn(true); in getAvailabilityStatus_currentUser_noRestriction_available()
105 when(mMockProfileHelper.isCurrentProcessUser(userInfo)).thenReturn(true); in getAvailabilityStatus_currentUser_noRestriction_available_zoneWrite()
106 when(mMockProfileHelper.canCurrentProcessModifyAccounts()).thenReturn(true); in getAvailabilityStatus_currentUser_noRestriction_available_zoneWrite()
120 when(mMockProfileHelper.isCurrentProcessUser(userInfo)).thenReturn(true); in getAvailabilityStatus_currentUser_noRestriction_available_zoneRead()
121 when(mMockProfileHelper.canCurrentProcessModifyAccounts()).thenReturn(true); in getAvailabilityStatus_currentUser_noRestriction_available_zoneRead()
135 when(mMockProfileHelper.isCurrentProcessUser(userInfo)).thenReturn(true); in getAvailabilityStatus_currentUser_noRestriction_available_zoneHidden()
136 when(mMockProfileHelper.canCurrentProcessModifyAccounts()).thenReturn(true); in getAvailabilityStatus_currentUser_noRestriction_available_zoneHidden()
150 when(mMockProfileHelper.isCurrentProcessUser(userInfo)).thenReturn(false); in getAvailabilityStatus_notCurrentUser_notAvailable()
[all …]
DAccountDetailsPreferenceControllerTest.java73 private ProfileHelper mMockProfileHelper; field in AccountDetailsPreferenceControllerTest
96 when(mMockProfileHelper.canCurrentProcessModifyAccounts()).thenReturn(false); in cannotModifyUsers_demoOrGuestUser_removeAccountButtonShouldNotBeVisible()
97 when(mMockProfileHelper.isDemoOrGuest()).thenReturn(true); in cannotModifyUsers_demoOrGuestUser_removeAccountButtonShouldNotBeVisible()
106 when(mMockProfileHelper.canCurrentProcessModifyAccounts()).thenReturn(false); in cannotModifyUsers_restrictedByUm_removeAccountButtonShouldNotBeVisible()
116 when(mMockProfileHelper.canCurrentProcessModifyAccounts()).thenReturn(false); in cannotModifyUsers_demoOrGuestAndRestrictedByUm_removeAccountButtonNotVisible()
117 when(mMockProfileHelper.isDemoOrGuest()).thenReturn(true); in cannotModifyUsers_demoOrGuestAndRestrictedByUm_removeAccountButtonNotVisible()
128 when(mMockProfileHelper.canCurrentProcessModifyAccounts()).thenReturn(false); in cannotModifyUsers_restrictedByDpm_removeAccountButtonAvailableForViewing()
139 when(mMockProfileHelper.canCurrentProcessModifyAccounts()).thenReturn(true); in canModifyUsers_removeAccountButtonShouldBeVisible()
149 when(mMockProfileHelper.canCurrentProcessModifyAccounts()).thenReturn(true); in onRemoveAccountButtonClicked_canModifyUsers_shouldShowConfirmRemoveAccountDialog()
162 when(mMockProfileHelper.canCurrentProcessModifyAccounts()).thenReturn(false); in onRemoveAccountButtonClicked_canModifyUsers_restrictedByDpm_showAdminDialog()
[all …]
DAddAccountPreferenceControllerTest.java81 private ProfileHelper mMockProfileHelper; field in AddAccountPreferenceControllerTest
244 when(mMockProfileHelper.isDemoOrGuest()).thenReturn(true); in cannotModifyUsers_demoOrGuestAndRestricedByDpm_addAccountButtonShouldBeDisabled()
255 when(mMockProfileHelper.isDemoOrGuest()).thenReturn(true); in cannotModifyUsers_addAccountButtonShouldBeDisabled_zoneWrite()
268 when(mMockProfileHelper.isDemoOrGuest()).thenReturn(true); in cannotModifyUsers_addAccountButtonShouldBeDisabled_zoneRead()
281 when(mMockProfileHelper.isDemoOrGuest()).thenReturn(true); in cannotModifyUsers_addAccountButtonShouldBeDisabled_zoneHidden()
294 when(mMockProfileHelper.isDemoOrGuest()).thenReturn(true); in cannotModifyUsers_demoOrGuestUser_addAccountButtonShouldBeDisabled()
303 when(mMockProfileHelper.isDemoOrGuest()).thenReturn(true); in cannotModifyUsers_demoOrGuestUser_addAccountButtonShouldBeDisabled_zoneWrite()
314 when(mMockProfileHelper.isDemoOrGuest()).thenReturn(true); in cannotModifyUsers_demoOrGuestUser_addAccountButtonShouldBeDisabled_zoneRead()
325 when(mMockProfileHelper.isDemoOrGuest()).thenReturn(true); in cannotModifyUsers_demoOrGuestUser_addAccountButtonShouldBeDisabled_zoneHidden()
336 when(mMockProfileHelper.canCurrentProcessModifyAccounts()).thenReturn(true); in canModifyUsers_addAccountButtonShouldBeAvailable()
[all …]
DAccountListPreferenceControllerTest.java98 private ProfileHelper mMockProfileHelper; field in AccountListPreferenceControllerTest
252 when(mMockProfileHelper.canCurrentProcessModifyAccounts()).thenReturn(true); in onAccountPreferenceClicked_shouldLaunchAccountDetailsFragment()
278 when(mMockProfileHelper.isDemoOrGuest()).thenReturn(true); in getAvailabilityStatus_demoOrGuest_notAvailable()
287 when(mMockProfileHelper.isDemoOrGuest()).thenReturn(true); in getAvailabilityStatus_demoOrGuest_notAvailable_zoneWrite()
298 when(mMockProfileHelper.isDemoOrGuest()).thenReturn(true); in getAvailabilityStatus_demoOrGuest_notAvailable_zoneRead()
309 when(mMockProfileHelper.isDemoOrGuest()).thenReturn(true); in getAvailabilityStatus_demoOrGuest_notAvailable_zoneHidden()
368 when(mMockProfileHelper.isDemoOrGuest()).thenReturn(true); in getAvailabilityStatus_demoOrGuest_restrictedByDpm_notAvailable()
379 when(mMockProfileHelper.isDemoOrGuest()).thenReturn(true); in getAvailabilityStatus_demoOrGuest_restrictedByDpm_notAvailable_zoneWrite()
392 when(mMockProfileHelper.isDemoOrGuest()).thenReturn(true); in getAvailabilityStatus_demoOrGuest_restrictedByDpm_notAvailable_zoneRead()
405 when(mMockProfileHelper.isDemoOrGuest()).thenReturn(true); in getAvailabilityStatus_demoOrGuest_restrictedByDpm_notAvailable_zoneHidden()
[all …]
DChooseAccountPreferenceControllerTest.java87 private ProfileHelper mMockProfileHelper; field in ChooseAccountPreferenceControllerTest
206 when(ProfileHelper.getInstance(mContext)).thenReturn(mMockProfileHelper); in initMocks()
208 when(mMockProfileHelper.getCurrentProcessUserInfo()).thenReturn(userInfo); in initMocks()
209 when(mMockProfileHelper.canCurrentProcessModifyAccounts()).thenReturn(true); in initMocks()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/profiles/
DProfileDetailsActionButtonsPreferenceControllerTest.java79 private ProfileHelper mMockProfileHelper; field in ProfileDetailsActionButtonsPreferenceControllerTest
96 mMockProfileHelper, mMockUserManager, mRemoveProfileHandler); in setUp()
109 when(mMockProfileHelper.isCurrentProcessUser(userInfo)).thenReturn(true); in onStart_userIsViewingSelf_renameButtonShown()
121 when(mMockProfileHelper.isCurrentProcessUser(userInfo)).thenReturn(false); in onStart_userIsNotViewingSelf_renameButtonHidden()
133 when(mMockProfileHelper.isCurrentProcessUser(userInfo)).thenReturn(false); in onStart_isAdminViewingNonAdmin_makeAdminButtonShown()
147 when(mMockProfileHelper.isCurrentProcessUser(userInfo)).thenReturn(false); in onStart_isAdminViewingAdmin_makeAdminButtonHidden()
163 when(mMockProfileHelper.isCurrentProcessUser(userInfo)).thenReturn(true); in onStart_isAdminViewingSelf_manageOtherProfilesButtonShown()
165 when(mMockProfileHelper.getAllLivingProfiles(any())).thenReturn(otherUsers); in onStart_isAdminViewingSelf_manageOtherProfilesButtonShown()
183 when(mMockProfileHelper.isCurrentProcessUser(userInfo)).thenReturn(false); in onStart_isAdminViewingOther_manageOtherProfilesButtonHidden()
185 when(mMockProfileHelper.getAllLivingProfiles(any())).thenReturn(otherUsers); in onStart_isAdminViewingOther_manageOtherProfilesButtonHidden()
[all …]
DProfileDetailsDeletePreferenceControllerTest.java69 private ProfileHelper mMockProfileHelper; field in ProfileDetailsDeletePreferenceControllerTest
83 mContext, mMockProfileHelper, mMockUserManager, mMockFragmentController); in setUp()
86 mMockProfileHelper, mRemoveProfileHandler); in setUp()
93 when(mMockProfileHelper.isCurrentProcessUser(userInfo)).thenReturn(true); in onCreate_userNotRestricted_deleteButtonShown()
104 when(mMockProfileHelper.isCurrentProcessUser(userInfo)).thenReturn(true); in onCreate_userRestrictedByUm_deleteButtonHidden()
117 when(mMockProfileHelper.isCurrentProcessUser(userInfo)).thenReturn(true); in onCreate_userRestrictedByDpm_deleteButtonVisible()
131 when(mMockProfileHelper.isCurrentProcessUser(userInfo)).thenReturn(true); in onCreate_userIsViewingSelf_deleteButtonHidden()
143 when(mMockProfileHelper.isCurrentProcessUser(userInfo)).thenReturn(false); in onCreate_userIsNotViewingSelf_deleteButtonHidden()
155 when(mMockProfileHelper.isCurrentProcessUser(userInfo)).thenReturn(true); in onCreate_isDemoUser_deleteButtonHidden()
167 when(mMockProfileHelper.isCurrentProcessUser(userInfo)).thenReturn(true); in onCreate_isDemoUserAndRestrictedByDpm_deleteButtonHidden()
[all …]
DProfileDetailsHeaderPreferenceControllerTest.java59 private ProfileHelper mMockProfileHelper; field in ProfileDetailsHeaderPreferenceControllerTest
72 mPreferenceController.setProfileHelper(mMockProfileHelper); in setUp()
78 when(mMockProfileHelper.isCurrentProcessUser(userInfo)).thenReturn(false); in onCreate_elementHasTitle()
108 when(mMockProfileHelper.isCurrentProcessUser(userInfo)).thenReturn(false); in onCreate_isAdmin_notCurrentProfile()
120 when(mMockProfileHelper.isCurrentProcessUser(userInfo)).thenReturn(true); in onCreate_isAdmin_currentProfile()
DRemoveProfileHandlerTest.java76 private ProfileHelper mMockProfileHelper; field in RemoveProfileHandlerTest
92 mContext, mMockProfileHelper, mMockUserManager, mMockFragmentController); in setUp()
170 verify(mMockProfileHelper).removeProfile(mContext, userInfo); in onDeleteConfirmed_removeProfile()
240 when(mMockProfileHelper.isCurrentProcessUser(userInfo)).thenReturn(isCurrentProcess); in mockCurrentUserInfo()
DAddProfilePreferenceControllerTest.java73 private ProfileHelper mMockProfileHelper; field in AddProfilePreferenceControllerTest
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/storage/
DStorageAsyncLoaderTest.java73 private ProfileHelper mMockProfileHelper; field in StorageAsyncLoaderTest
80 mMockProfileHelper); in setUp()
85 when(mMockProfileHelper.getAllProfiles()).thenReturn(mUsers); in setUp()