Home
last modified time | relevance | path

Searched refs:mMockContext (Results 1 – 5 of 5) sorted by relevance

/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/
DDpmTestBase.java41 protected DpmMockContext mMockContext; field in DpmTestBase
56 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()
DDevicePolicyManagerServiceMigrationTest.java58 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()
DDevicePolicyManagerTest.java317 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 …]
/frameworks/base/core/tests/coretests/src/android/net/
DNetworkScorerAppManagerTest.java42 @Mock private Context mMockContext; field in NetworkScorerAppManagerTest
56 Mockito.when(mMockContext.getPackageManager()).thenReturn(mMockPm); in setUp()
84 NetworkScorerAppManager.getAllValidScorers(mMockContext).iterator(); in testGetAllValidScorers()
/frameworks/base/docs/html/training/testing/unit-testing/
Dlocal-unit-tests.jd171 Context mMockContext;
176 when(mMockContext.getString(R.string.hello_word))
178 ClassUnderTest myObjectUnderTest = new ClassUnderTest(mMockContext);