Home
last modified time | relevance | path

Searched refs:mockUserManager (Results 1 – 6 of 6) sorted by relevance

/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/task/
DDisallowAddUserTaskTest.java46 @Mock private UserManager mockUserManager; field in DisallowAddUserTaskTest
66 when(mockContext.getSystemService(Context.USER_SERVICE)).thenReturn(mockUserManager); in setUp()
68 when(mockUserManager.hasUserRestriction(anyString(), any(UserHandle.class))) in setUp()
76 when(mockUserManager.getUsers()).thenReturn(Collections.singletonList(primaryUser)); in testMaybeDisallowAddUsers_normalSystem()
85 verify(mockUserManager).setUserRestriction(UserManager.DISALLOW_ADD_USER, true, in testMaybeDisallowAddUsers_normalSystem()
94 when(mockUserManager.getUsers()).thenReturn(Collections.singletonList(primaryUser)); in testMaybeDisallowAddUsers_normalSystem_restrictionAlreadySetupForOneUser()
100 when(mockUserManager.hasUserRestriction(UserManager.DISALLOW_ADD_USER, in testMaybeDisallowAddUsers_normalSystem_restrictionAlreadySetupForOneUser()
108 verify(mockUserManager, never()).setUserRestriction(anyString(), anyBoolean(), in testMaybeDisallowAddUsers_normalSystem_restrictionAlreadySetupForOneUser()
116 when(mockUserManager.getUsers()).thenReturn(Arrays.asList(new UserInfo[]{ in testMaybeDisallowAddUsers_splitUserSystem_meatUserDeviceOwner()
126 verify(mockUserManager).setUserRestriction(UserManager.DISALLOW_ADD_USER, true, in testMaybeDisallowAddUsers_splitUserSystem_meatUserDeviceOwner()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DBatteryEntryTest.java63 @Mock private UserManager mockUserManager; field in BatteryEntryTest
82 return new BatteryEntry(mockContext, mockHandler, mockUserManager, createSipperForApp()); in createBatteryEntryForApp()
93 return new BatteryEntry(mockContext, mockHandler, mockUserManager, createSipperForSystem()); in createBatteryEntryForSystem()
147 mockUserManager, batterySipper); in batteryEntryForAOD_containCorrectInfo()
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/
DContactsActor.java157 public MockUserManager mockUserManager; field in ContactsActor
327 return mockUserManager; in ContactsActor()
377 return mockUserManager; in ContactsActor()
402 return mockUserManager.getUserHandle(); in ContactsActor()
417 mockUserManager = new MockUserManager(mProviderContext); in ContactsActor()
DContactsProvider2Test.java2114 mActor.mockUserManager.setUsers(MockUserManager.PRIMARY_USER, MockUserManager.CORP_USER); in setUpCorpProvider()
2132 mActor.mockUserManager.setUsers(MockUserManager.PRIMARY_USER, MockUserManager.CORP_USER); in setUpNullCorpProvider()
2854 final MockUserManager um = mActor.mockUserManager; in testQueryCorpContactsProvider()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/applications/
DApplicationDetailsFragmentTest.java112 UserManager mockUserManager = mock(UserManager.class); in setUp() local
113 when(mockUserManager.getUserInfo(userId)).thenReturn(userInfo); in setUp()
114 ShadowUserManager.setInstance(mockUserManager); in setUp()
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/util/
DUserUtilsTest.java45 final MockUserManager um = mActor.mockUserManager; in testGetCorpUser()