/packages/apps/Email/tests/src/com/android/emailcommon/provider/ |
QuickResponseTests.java | 33 private Context mMockContext; 43 mMockContext = getMockContext();
|
/packages/providers/BlockedNumberProvider/tests/src/com/android/providers/blockednumber/ |
BlockedNumberProviderTest.java | 59 private MyMockContext mMockContext; 67 mMockContext = spy(new MyMockContext(getContext())); 68 mMockContext.initializeContext(); 69 mResolver = mMockContext.getContentResolver(); 71 when(mMockContext.mUserManager.isPrimaryUser()).thenReturn(true); 72 when(mMockContext.mCountryDetector.detectCountry()) 74 when(mMockContext.mAppOpsManager.noteOp( 81 mMockContext.shutdown(); 178 verify(mMockContext.mBackupManager, times(2)).dataChanged(); 262 when(mMockContext.mCarrierConfigManager.getConfig() [all...] |
/packages/apps/StorageManager/robotests/src/com/android/storagemanager/automatic/ |
AutomaticStorageBroadcastReceiverTest.java | 44 @Mock private Context mMockContext; 55 when(mMockContext.getSystemService(Context.JOB_SCHEDULER_SERVICE)).thenReturn( 59 br.onReceive(mMockContext, mMockIntent);
|
/packages/apps/Email/tests/src/com/android/email/mail/ |
StoreTests.java | 43 private Context mMockContext; 48 mMockContext = getMockContext(); 64 Account testAccount = ProviderTestUtils.setupAccount("pop", false, mMockContext); 69 testAccount.save(mMockContext); 77 testAccount = ProviderTestUtils.setupAccount("pop", false, mMockContext); 82 testAccount.save(mMockContext); 89 testAccount = ProviderTestUtils.setupAccount("unknown", false, mMockContext);
|
/packages/apps/Email/tests/src/com/android/email/provider/ |
AccountBackupRestoreTests.java | 40 private Context mMockContext; 49 mMockContext = getMockContext(); 84 ProviderTestUtils.setupAccount("testBackup1", false, mMockContext); 86 ProviderTestUtils.setupHostAuth("legacy-recv", 0, false, mMockContext); 88 ProviderTestUtils.setupHostAuth("legacy-send", 0, false, mMockContext); 89 saved1.save(mMockContext); 91 ProviderTestUtils.setupAccount("testBackup2", false, mMockContext); 93 ProviderTestUtils.setupHostAuth("legacy-recv", 0, false, mMockContext); 95 ProviderTestUtils.setupHostAuth("legacy-send", 0, false, mMockContext); 96 saved2.save(mMockContext); [all...] |
PolicyTests.java | 49 private Context mMockContext; 58 mMockContext = getMockContext(); 71 Account account1 = ProviderTestUtils.setupAccount("acct1", true, mMockContext); 73 SecurityPolicy.setAccountPolicy(mMockContext, account1, policy1, securitySyncKey); 74 Account account2 = ProviderTestUtils.setupAccount("acct2", true, mMockContext); 76 SecurityPolicy.setAccountPolicy(mMockContext, account2, policy2, securitySyncKey); 78 account1.refresh(mMockContext); 79 account2.refresh(mMockContext); 84 assertEquals(account1.mId, Policy.getAccountIdWithPolicyKey(mMockContext, 86 assertEquals(account2.mId, Policy.getAccountIdWithPolicyKey(mMockContext, [all...] |
/packages/apps/Settings/tests/robotests/src/com/android/settings/support/ |
NewDeviceIntroSuggestionActivityTest.java | 56 private Context mMockContext; 65 mFeatureFactory = FakeFeatureFactory.setupForTest(mMockContext); 75 when(mMockContext.getResources()
|
/frameworks/base/core/tests/coretests/src/com/android/internal/app/ |
ResolverListControllerTest.java | 66 @Mock private Context mMockContext; 82 when(mMockContext.getResources()).thenReturn(mMockResources); 83 when(mMockContext.getPackageName()).thenReturn("android"); 84 when(mMockContext.getUserId()).thenReturn(54321); 85 when(mMockContext.getSharedPreferences(anyString(), anyInt())).thenReturn(null); 86 when(mMockContext.getPackageManager()).thenReturn(mMockPackageManager); 113 when(mMockContext.getOpPackageName()).thenReturn(refererPackage); 114 mUsm = new UsageStatsManager(mMockContext, mMockService); 115 when(mMockContext.getSystemService(Context.USAGE_STATS_SERVICE)).thenReturn(mUsm); 116 mController = new ResolverListController(mMockContext, mMockPackageManager, sendIntent [all...] |
/frameworks/base/tests/net/java/com/android/server/connectivity/tethering/ |
TetheringConfigurationTest.java | 58 private Context mMockContext; 89 mMockContext = new MockContext(mContext); 99 final TetheringConfiguration cfg = new TetheringConfiguration(mMockContext, mLog); 115 final TetheringConfiguration cfg = new TetheringConfiguration(mMockContext, mLog); 131 final TetheringConfiguration cfg = new TetheringConfiguration(mMockContext, mLog); 148 final TetheringConfiguration cfg = new TetheringConfiguration(mMockContext, mLog); 169 final TetheringConfiguration cfg = new TetheringConfiguration(mMockContext, mLog); 187 final TetheringConfiguration cfg = new TetheringConfiguration(mMockContext, mLog);
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/aware/ |
WifiAwareRttStateManagerTest.java | 55 private Context mMockContext; 76 mMockContext, mTestLooper.getLooper(), mMockHandler); 79 mDut.startWithRttService(mMockContext, mTestLooper.getLooper(), mMockRttService);
|
/packages/apps/Email/tests/src/com/android/email/service/ |
EmailBroadcastProcessorServiceTests.java | 42 Context mMockContext; 51 mMockContext = getMockContext(); 74 Integer flags = Utility.getFirstRowInt(mMockContext, uri, 87 Account account1 = ProviderTestUtils.setupAccount("eas-account1", false, mMockContext); 90 account1.save(mMockContext); 92 Account account2 = ProviderTestUtils.setupAccount("pop-account1", false, mMockContext); 96 account2.save(mMockContext); 98 Account account3 = ProviderTestUtils.setupAccount("pop-account2", false, mMockContext); 101 account3.save(mMockContext); 103 Account account4 = ProviderTestUtils.setupAccount("imap-account1", false, mMockContext); [all...] |
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/ |
RecentAppsPreferenceControllerTest.java | 80 private Context mMockContext; 94 when(mMockContext.getSystemService(Context.USAGE_STATS_SERVICE)) 96 when(mMockContext.getSystemService(Context.USER_SERVICE)) 128 new RecentAppsPreferenceController(mMockContext, (Application) null, null)); 140 mController = new RecentAppsPreferenceController(mMockContext, mAppState, null); 141 when(mMockContext.getResources().getBoolean(R.bool.config_display_recent_apps)) 155 when(mMockContext.getResources().getBoolean(R.bool.config_display_recent_apps)) 180 when(mMockContext.getPackageManager().resolveActivity(any(Intent.class), anyInt())) 186 when(mMockContext.getResources().getConfiguration()).thenReturn(configuration); 188 mController = new RecentAppsPreferenceController(mMockContext, mAppState, null) [all...] |
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/assist/ |
AssistFlashScreenPreferenceControllerTest.java | 55 private Context mMockContext; 80 ReflectionHelpers.setField(mController, "mContext", mMockContext); 91 ReflectionHelpers.setField(mController, "mContext", mMockContext);
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/datetime/ |
AutoTimeZonePreferenceControllerTest.java | 44 private Context mMockContext; 61 when(mMockContext.getSystemService(Context.CONNECTIVITY_SERVICE)).thenReturn(mCm); 68 mMockContext, null /* callback */, true /* isFromSUW */); 76 mMockContext, null /* callback */, false /* isFromSUW */); 86 mMockContext, null /* callback */, false /* isFromSUW */); 94 mMockContext, null /* callback */, true /* isFromSUW */); 104 mMockContext, null /* callback */, false /* isFromSUW */);
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/search/ |
SiteMapManagerTest.java | 62 private Context mMockContext; 71 FakeFeatureFactory.setupForTest(mMockContext); 72 mFeatureFactory = (FakeFeatureFactory) FakeFeatureFactory.getFactory(mMockContext);
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/ |
WifiMasterSwitchPreferenceControllerTest.java | 52 Context mMockContext; 68 FakeFeatureFactory.setupForTest(mMockContext); 69 mFakeFeatureFactory = (FakeFeatureFactory) FakeFeatureFactory.getFactory(mMockContext);
|
/packages/apps/UnifiedEmail/tests/src/com/android/mail/browse/ |
ConversationCursorTests.java | 44 Context mMockContext; 63 mMockContext = getMockContext(); 64 mMockResolver = (MockContentResolver)mMockContext.getContentResolver();
|
/packages/services/Telephony/tests/src/com/android/phone/euicc/ |
EuiccUiDispatcherActivityTest.java | 48 @Mock private Context mMockContext; 59 when(mMockContext.getSystemService(Context.EUICC_SERVICE)).thenReturn(mMockEuiccManager); 107 attachBaseContext(mMockContext);
|
/tools/tradefederation/core/tests/src/com/android/tradefed/sandbox/ |
TradefedSandboxTest.java | 52 private IInvocationContext mMockContext; 67 mMockContext = new InvocationContext(); 111 Exception res = mSandbox.prepareEnvironment(mMockContext, mMockConfig, mMockListener); 143 Exception res = mSandbox.prepareEnvironment(mMockContext, mMockConfig, mMockListener); 161 Exception res = mSandbox.prepareEnvironment(mMockContext, mMockConfig, mMockListener);
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ims/ |
ImsServiceControllerTest.java | 69 @Mock Context mMockContext; 79 mTestImsServiceController = new ImsServiceController(mMockContext, mTestComponentName, 82 when(mMockContext.bindService(any(), any(), anyInt())).thenReturn(true); 110 verify(mMockContext).bindService(intentCaptor.capture(), any(), eq(expectedFlags)); 129 verify(mMockContext, times(1)).bindService(any(), any(), anyInt()); 199 verify(mMockContext).unbindService(eq(conn)); 364 verify(mMockContext, times(2)).bindService(any(), any(), anyInt()); 382 verify(mMockContext, times(1)).bindService(any(), any(), anyInt()); 403 verify(mMockContext, times(1)).bindService(any(), any(), anyInt()); 424 verify(mMockContext, times(2)).bindService(any(), any(), anyInt()) [all...] |
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/ |
InCallControllerTests.java | 87 @Mock MockContext mMockContext; 109 doReturn(mMockResources).when(mMockContext).getResources(); 113 mEmergencyCallHelper = new EmergencyCallHelper(mMockContext, SYS_PKG, 115 mInCallController = new InCallController(mMockContext, mLock, mMockCallsManager, 128 when(mMockContext.getPackageManager()).thenReturn(mMockPackageManager); 139 verify(mMockContext).bindServiceAsUser( 158 when(mMockContext.getPackageManager()).thenReturn(mMockPackageManager); 172 verify(mMockContext).bindServiceAsUser( 194 when(mMockContext.getPackageManager()).thenReturn(mMockPackageManager); 202 when(mMockContext.bindServiceAsUser(any(Intent.class), any(ServiceConnection.class) [all...] |
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/ |
MagnificationControllerTest.java | 81 final Context mMockContext = mock(Context.class); 109 when(mMockContext.getMainLooper()).thenReturn(Looper.myLooper()); 111 when(mMockContext.getResources()).thenReturn(mockResources); 115 mMagnificationController = new MagnificationController(mMockContext, mMockAms, new Object(), 139 verify(mMockContext).registerReceiver( 150 verify(mMockContext).unregisterReceiver((BroadcastReceiver) anyObject()); 489 verify(mMockContext).registerReceiver( 493 br.onReceive(mMockContext, null); [all...] |
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/ |
DpmTestBase.java | 45 protected DpmMockContext mMockContext; 61 mMockContext = new DpmMockContext(mServices, mRealTestContext); 74 return mMockContext; 86 * Simulate an RPC from {@param caller} to the service context ({@link #mMockContext}). 93 final DpmMockContext serviceContext = mMockContext;
|
/frameworks/opt/telephony/tests/telephonytests/src/android/telephony/ims/ |
ImsServiceTest.java | 76 private Context mMockContext; 83 mTestImsService = new TestImsService(mMockContext); 149 doThrow(new SecurityException()).when(mMockContext).enforceCallingOrSelfPermission( 164 when(mMockContext.checkCallingOrSelfPermission(READ_PRIVILEGED_PHONE_STATE)).thenReturn( 166 doThrow(new SecurityException()).when(mMockContext).enforceCallingOrSelfPermission( 193 verify(mMockContext).sendBroadcast(intentCaptor.capture()); 215 verify(mMockContext).sendBroadcast(intentCaptor.capture());
|
/packages/apps/Email/tests/src/com/android/emailcommon/internet/ |
Rfc822OutputTests.java | 73 private Context mMockContext; 83 mMockContext = getMockContext(); 84 mForwardIntro = mMockContext.getString(R.string.message_compose_fwd_header_fmt, SUBJECT, 95 return Body.restoreBodyWithMessageId(mMockContext, message.mId); 110 msg.save(mMockContext); 122 msg.save(mMockContext); 126 Rfc822Output.writeTo(mMockContext, msg, byteStream, true, false, null); 156 msg.save(mMockContext); 160 Rfc822Output.writeTo(mMockContext, msg, byteStream, true, false, null); 200 msg.save(mMockContext); [all...] |