/packages/modules/CellBroadcastService/tests/src/com/android/cellbroadcastservice/tests/ |
D | CellBroadcastServiceTestBase.java | 65 protected Context mMockedContext; field in CellBroadcastServiceTestBase 129 doReturn(mMockedContentResolver).when(mMockedContext).getContentResolver(); in setUp() 130 doReturn(mMockedResources).when(mMockedContext).getResources(); in setUp() 133 PowerManager powerManager = new PowerManager(mMockedContext, mock(IPowerManager.class), in setUp() 136 doReturn(powerManager).when(mMockedContext).getSystemService(Context.POWER_SERVICE); in setUp() 137 doReturn(mMockedTelephonyManager).when(mMockedContext) in setUp() 139 doReturn(Context.TELEPHONY_SERVICE).when(mMockedContext) in setUp() 141 doReturn(mMockedSubscriptionManager).when(mMockedContext) in setUp() 143 doReturn(Context.TELEPHONY_SUBSCRIPTION_SERVICE).when(mMockedContext).getSystemServiceName( in setUp() 145 doReturn(mMockedLocationManager).when(mMockedContext) in setUp() [all …]
|
D | CellBroadcastServiceMetricsTest.java | 52 doReturn(mSharedPreference).when(mMockedContext) in setUp() 73 CellBroadcastServiceMetrics.getInstance().getFeatureMetrics(mMockedContext); in testGetFeatureMetrics() 75 CellBroadcastServiceMetrics.getInstance().getFeatureMetrics(mMockedContext); in testGetFeatureMetrics() 93 test1 = CellBroadcastServiceMetrics.getInstance().getFeatureMetrics(mMockedContext); in testGetFeatureMetrics() 99 CellBroadcastServiceMetrics.getInstance().getFeatureMetrics(mMockedContext) in testGetFeatureMetrics() 101 CellBroadcastServiceMetrics.getInstance().getFeatureMetrics(mMockedContext) in testGetFeatureMetrics() 103 CellBroadcastServiceMetrics.getInstance().getFeatureMetrics(mMockedContext) in testGetFeatureMetrics() 106 test1 = CellBroadcastServiceMetrics.getInstance().getFeatureMetrics(mMockedContext); in testGetFeatureMetrics() 117 CellBroadcastServiceMetrics.getInstance().getFeatureMetrics(mMockedContext); in testEquals() 144 CellBroadcastServiceMetrics.getInstance().getFeatureMetrics(mMockedContext); in testClone() [all …]
|
D | CellBroadcastHandlerTest.java | 188 mMockedContext, mTestbleLooper.getLooper(), mSendMessageFactory, mHandlerHelper); in setUp() 197 ((MockContentResolver) mMockedContext.getContentResolver()).addProvider( in setUp() 200 doReturn("com.android.cellbroadcastservice").when(mMockedContext).getPackageName(); in setUp() 201 doReturn(mMockedContext).when(mMockedContext).createConfigurationContext(any()); in setUp() 202 doReturn(mMockedResources).when(mMockedContext).getResources(); in setUp() 284 CellBroadcastHandler.makeCellBroadcastHandler(mMockedContext); in testMakeCellBroadcastHandler() 309 CellBroadcastHandler.putPhoneIdAndSubIdExtra(mMockedContext, intent, phoneId); in testPutPhoneIdAndSubIdExtra() 325 CellBroadcastHandler.putPhoneIdAndSubIdExtra(mMockedContext, intentNoSubId, phoneId); in testPutPhoneIdAndSubIdExtra() 452 verify(mMockedContext, never()).createConfigurationContext(any()); in testGetResources() 453 verify(mMockedContext, times(1)).getResources(); in testGetResources() [all …]
|
D | GsmCellBroadcastHandlerTest.java | 190 ((MockContentResolver) mMockedContext.getContentResolver()).addProvider( in setUp() 193 ((MockContentResolver) mMockedContext.getContentResolver()).addProvider( in setUp() 195 doReturn(mMockedContext).when(mMockedContext).createConfigurationContext(any()); in setUp() 196 doReturn("com.android.cellbroadcastservice").when(mMockedContext).getPackageName(); in setUp() 197 doReturn(mMockedResources).when(mMockedContext).getResources(); in setUp() 214 mGsmCellBroadcastHandler = new GsmCellBroadcastHandler(mMockedContext, in setUp() 248 verify(mMockedContext).sendOrderedBroadcast(intentCaptor.capture(), any(), in testTriggerMessage() 264 verify(mMockedContext, times(2)).unregisterReceiver(any()); in testCleanup() 281 verify(mMockedContext, never()).sendOrderedBroadcast(any(), anyString(), anyString(), in testAirplaneModeReset() 300 verify(mMockedContext, never()).sendOrderedBroadcast(any(), anyString(), anyString(), in testGeofencingAlertOutOfPolygon() [all …]
|
D | CdmaSmsMessageTest.java | 568 doTestNonEmergencyBroadcast(mMockedContext, ENCODING_7BIT_ASCII); in testNonEmergencyBroadcast7bitAscii() 573 doTestNonEmergencyBroadcast(mMockedContext, ENCODING_GSM_7BIT_ALPHABET); in testNonEmergencyBroadcast7bitGsm() 578 doTestNonEmergencyBroadcast(mMockedContext, ENCODING_UNICODE_16); in testNonEmergencyBroadcast16bitUnicode() 610 doTestCmasBroadcast(mMockedContext, in testCmasPresidentialAlert() 617 doTestCmasBroadcast(mMockedContext, CdmaSmsCbProgramData.CATEGORY_CMAS_EXTREME_THREAT, in testCmasExtremeAlert() 623 doTestCmasBroadcast(mMockedContext, CdmaSmsCbProgramData.CATEGORY_CMAS_SEVERE_THREAT, in testCmasSevereAlert() 629 doTestCmasBroadcast(mMockedContext, in testCmasAmberAlert() 636 doTestCmasBroadcast(mMockedContext, CdmaSmsCbProgramData.CATEGORY_CMAS_TEST_MESSAGE, in testCmasTestMessage() 649 DefaultCellBroadcastService.parseCdmaBroadcastSms(mMockedContext, in testCmasExtremeAlertType1Elements() 680 DefaultCellBroadcastService.parseCdmaBroadcastSms(mMockedContext, in testCmasUnsupportedCharSet() [all …]
|
D | GsmSmsCbMessageTest.java | 78 String message = GsmSmsCbMessage.getEtwsPrimaryMessage(mMockedContext, in testGetEtwsPrimaryMessage() 83 message = GsmSmsCbMessage.getEtwsPrimaryMessage(mMockedContext, in testGetEtwsPrimaryMessage() 88 message = GsmSmsCbMessage.getEtwsPrimaryMessage(mMockedContext, in testGetEtwsPrimaryMessage() 93 message = GsmSmsCbMessage.getEtwsPrimaryMessage(mMockedContext, in testGetEtwsPrimaryMessage() 98 message = GsmSmsCbMessage.getEtwsPrimaryMessage(mMockedContext, in testGetEtwsPrimaryMessage() 126 SmsCbMessage msg = GsmSmsCbMessage.createSmsCbMessage(mMockedContext, header, null, pdus, in testCreateMessageFromBinary()
|
D | CbSendMessageCalculatorTest.java | 177 new CbSendMessageCalculator(mMockedContext, new ArrayList<>(), 10); in testNone() 280 CbSendMessageCalculator calculator = new CbSendMessageCalculator(mMockedContext, l); in testThreshold() 300 return new CbSendMessageCalculator(mMockedContext, list, threshold); in createCalculator()
|
/packages/services/Telephony/tests/src/com/android/phone/ |
D | NotificationMgrTest.java | 124 @Mock Context mMockedContext; field in NotificationMgrTest 143 when(mPhone.getContext()).thenReturn(mMockedContext); in setUp() 144 when(mMockedContext.getResources()).thenReturn(mResources); in setUp()
|