Searched refs:mMockContext (Results 1 – 5 of 5) sorted by relevance
41 protected DpmMockContext mMockContext; field in DpmTestBase56 mMockContext = new DpmMockContext( in setUp()67 return mMockContext; in getContext()81 doReturn(pi).when(mMockContext.ipackageManager).getPackageInfo( in markPackageAsInstalled()132 doReturn(ai).when(mMockContext.ipackageManager).getApplicationInfo( in setUpPackageManagerForFakeAdmin()159 doReturn(aci).when(mMockContext.ipackageManager).getReceiverInfo( in setUpPackageManagerForFakeAdmin()
58 final File user10dir = mMockContext.addUser(10, 0); in testMigration()59 final File user11dir = mMockContext.addUser(11, UserInfo.FLAG_MANAGED_PROFILE); in testMigration()60 final File user12dir = mMockContext.addUser(12, 0); in testMigration()87 when(mMockContext.userManagerInternal.getBaseUserRestrictions( in testMigration()92 when(mMockContext.userManagerInternal.getBaseUserRestrictions( in testMigration()101 when(mMockContext.userManagerInternal.getBaseUserRestrictions( in testMigration()218 when(mMockContext.userManagerInternal.getBaseUserRestrictions( in testMigration2_profileOwnerOnUser0()
317 mMockContext.addUser(ANOTHER_USER_ID, 0); // Add one more user. in testSetActiveAdmin_multiUsers()326 mMockContext.binder.callingUid = ANOTHER_ADMIN_UID; in testSetActiveAdmin_multiUsers()330 mMockContext.binder.callingUid = DpmMockContext.CALLER_UID; in testSetActiveAdmin_multiUsers()334 mMockContext.binder.callingUid = ANOTHER_ADMIN_UID; in testSetActiveAdmin_multiUsers()967 mMockContext.addUser(ANOTHER_USER_ID, 0); // Add one more user. in checkDeviceOwnerWithMultipleDeviceAdmins()1572 mMockContext.binder.callingUid = DpmMockContext.CALLER_UID; in testSetGetSupportText()1620 mMockContext.binder.callingUid = DpmMockContext.CALLER_UID; in testSetGetSupportText()1641 mMockContext.binder.callingUid = DpmMockContext.CALLER_UID; in testSetGetSupportText()1876 reset(mMockContext.powerManagerInternal); in testSetMaximumTimeToLock()1877 reset(mMockContext.settings); in testSetMaximumTimeToLock()[all …]
42 @Mock private Context mMockContext; field in NetworkScorerAppManagerTest56 Mockito.when(mMockContext.getPackageManager()).thenReturn(mMockPm); in setUp()84 NetworkScorerAppManager.getAllValidScorers(mMockContext).iterator(); in testGetAllValidScorers()
171 Context mMockContext;176 when(mMockContext.getString(R.string.hello_word))178 ClassUnderTest myObjectUnderTest = new ClassUnderTest(mMockContext);