/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/ |
D | CallAudioManagerTest.java | 116 ArgumentCaptor<CallAudioModeStateMachine.MessageArgs> captor = makeNewCaptor(); in testUnmuteOfSecondIncomingCall() local 126 eq(CallAudioModeStateMachine.NO_MORE_RINGING_CALLS), captor.capture()); in testUnmuteOfSecondIncomingCall() 137 assertMessageArgEquality(correctArgs, captor.getValue()); in testUnmuteOfSecondIncomingCall() 139 eq(CallAudioModeStateMachine.NEW_ACTIVE_OR_DIALING_CALL), captor.capture()); in testUnmuteOfSecondIncomingCall() 140 assertMessageArgEquality(correctArgs, captor.getValue()); in testUnmuteOfSecondIncomingCall() 179 ArgumentCaptor<CallAudioModeStateMachine.MessageArgs> captor = makeNewCaptor(); 188 eq(CallAudioModeStateMachine.NO_MORE_RINGING_CALLS), captor.capture()); 199 assertMessageArgEquality(correctArgs, captor.getValue()); 201 eq(CallAudioModeStateMachine.NEW_ACTIVE_OR_DIALING_CALL), captor.capture()); 202 assertMessageArgEquality(correctArgs, captor.getValue()); [all …]
|
D | DisconnectedCallNotifierTest.java | 89 ArgumentCaptor<Notification> captor = ArgumentCaptor.forClass(Notification.class); in testNotificationShownAfterEmergencyCall() local 91 captor.capture(), any(UserHandle.class)); in testNotificationShownAfterEmergencyCall() 92 Notification notification = captor.getValue(); in testNotificationShownAfterEmergencyCall() 112 ArgumentCaptor<Notification> captor = ArgumentCaptor.forClass(Notification.class); in testNotificationShownForDisconnectedEmergencyCall() local 114 captor.capture(), any(UserHandle.class)); in testNotificationShownForDisconnectedEmergencyCall() 115 Notification notification = captor.getValue(); in testNotificationShownForDisconnectedEmergencyCall()
|
D | ConnectionServiceFocusManagerTest.java | 69 ArgumentCaptor<CallsManager.CallsManagerListener> captor = in setUp() local 71 verify(mockCallsManagerRequester).setCallsManagerListener(captor.capture()); in setUp() 72 mCallsManagerListener = captor.getValue(); in setUp() 356 ArgumentCaptor<ConnectionServiceFocusListener> captor = in getConnectionServiceFocusListener() local 358 verify(connSvrFocus).setConnectionServiceFocusListener(captor.capture()); in getConnectionServiceFocusListener() 359 return captor.getValue(); in getConnectionServiceFocusListener()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/datausage/ |
D | DataUsageSummaryPreferenceControllerTest.java | 159 ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class); in testSummaryUpdate_onePlan_basic() local 160 verify(mSummaryPreference).setLimitInfo(captor.capture()); in testSummaryUpdate_onePlan_basic() 161 CharSequence value = captor.getValue(); in testSummaryUpdate_onePlan_basic() 184 ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class); in testSummaryUpdate_noPlan_basic() local 185 verify(mSummaryPreference).setLimitInfo(captor.capture()); in testSummaryUpdate_noPlan_basic() 186 CharSequence value = captor.getValue(); in testSummaryUpdate_noPlan_basic() 207 ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class); in testSummaryUpdate_noCarrier_basic() local 208 verify(mSummaryPreference).setLimitInfo(captor.capture()); in testSummaryUpdate_noCarrier_basic() 209 CharSequence value = captor.getValue(); in testSummaryUpdate_noCarrier_basic() 235 ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class); in testSummaryUpdate_noPlanData_basic() local [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/ |
D | ConfigureNotificationSettingsTest.java | 62 ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class); in getSummary_noneBlocked() local 63 verify(loader).setSummary(any(), captor.capture()); in getSummary_noneBlocked() 65 assertThat(captor.getValue().toString()).contains("On"); in getSummary_noneBlocked() 79 ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class); in getSummary_someBlocked() local 80 verify(loader).setSummary(any(), captor.capture()); in getSummary_someBlocked() 82 assertThat(captor.getValue().toString()).contains("Off"); in getSummary_someBlocked() 83 assertThat(captor.getValue().toString()).contains("5"); in getSummary_someBlocked()
|
/packages/apps/Car/Dialer/tests/robotests/src/com/android/car/dialer/ui/contact/ |
D | ContactListViewHolderTest.java | 201 ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class); in testClickCallActionButton_ContactHasOneNumber_placeCall() local 202 verify(mMockUiCallManager).placeCall(captor.capture()); in testClickCallActionButton_ContactHasOneNumber_placeCall() 203 assertThat(captor.getValue()).isEqualTo(PHONE_NUMBER_1); in testClickCallActionButton_ContactHasOneNumber_placeCall() 242 ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class); in testClickCallActionButton_HasMultipleNumbersAndPrimaryNumber_callPrimaryNumber() local 243 verify(mMockUiCallManager).placeCall(captor.capture()); in testClickCallActionButton_HasMultipleNumbersAndPrimaryNumber_callPrimaryNumber() 244 assertThat(captor.getValue()).isEqualTo(PHONE_NUMBER_2); in testClickCallActionButton_HasMultipleNumbersAndPrimaryNumber_callPrimaryNumber() 258 ArgumentCaptor<Contact> captor = ArgumentCaptor.forClass(Contact.class); in testClickShowContactDetailView_hasContactDetail_showContactDetail() local 259 verify(mMockListener).onShowContactDetail(captor.capture()); in testClickShowContactDetailView_hasContactDetail_showContactDetail() 260 assertThat(captor.getValue()).isEqualTo(mMockContact); in testClickShowContactDetailView_hasContactDetail_showContactDetail() 285 ArgumentCaptor<Contact> captor = ArgumentCaptor.forClass(Contact.class); in testClickShowContactDetailView_hasAddressButNoPhoneNumber_dependOnConfig() local [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/dream/ |
D | CurrentDreamPreferenceControllerTest.java | 86 ArgumentCaptor<GearPreference.OnGearClickListener> captor = in gearShowsIfActiveDreamInfoHasOptions() local 91 verify(mockPref).setOnGearClickListener(captor.capture()); in gearShowsIfActiveDreamInfoHasOptions() 92 captor.getAllValues().forEach(listener -> assertThat(listener).isNotNull()); in gearShowsIfActiveDreamInfoHasOptions() 103 ArgumentCaptor<GearPreference.OnGearClickListener> captor = in gearHidesIfActiveDreamInfoHasNoOptions() local 108 verify(mockPref).setOnGearClickListener(captor.capture()); in gearHidesIfActiveDreamInfoHasNoOptions() 109 captor.getAllValues().forEach(listener -> assertThat(listener).isNull()); in gearHidesIfActiveDreamInfoHasNoOptions()
|
D | StartNowPreferenceControllerTest.java | 72 ArgumentCaptor<OnClickListener> captor = in setsOnClickListenerForStartNow() local 76 verify(mButton).setOnClickListener(captor.capture()); in setsOnClickListenerForStartNow() 77 assertThat(captor.getValue()).isNotNull(); in setsOnClickListenerForStartNow()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/ |
D | WifiConnectionPreferenceControllerTest.java | 120 final ArgumentCaptor<AccessPointPreference> captor = ArgumentCaptor.forClass( in onConnectedChanged_wifiBecameDisconnected_preferenceRemoved() local 122 verify(mPreferenceCategory).addPreference(captor.capture()); in onConnectedChanged_wifiBecameDisconnected_preferenceRemoved() 123 final AccessPointPreference pref = captor.getValue(); in onConnectedChanged_wifiBecameDisconnected_preferenceRemoved() 142 final ArgumentCaptor<AccessPointPreference> captor = ArgumentCaptor.forClass( in onAccessPointsChanged_wifiBecameConnectedToDifferentAP_preferenceReplaced() local 153 verify(mPreferenceCategory, times(2)).addPreference(captor.capture()); in onAccessPointsChanged_wifiBecameConnectedToDifferentAP_preferenceReplaced() 154 final AccessPointPreference pref1 = captor.getAllValues().get(0); in onAccessPointsChanged_wifiBecameConnectedToDifferentAP_preferenceReplaced() 155 final AccessPointPreference pref2 = captor.getAllValues().get(1); in onAccessPointsChanged_wifiBecameConnectedToDifferentAP_preferenceReplaced()
|
D | MultiNetworkHeaderControllerTest.java | 136 ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); in onChildUpdated_subscriptionsBecameAvailable_categoryIsVisible() local 138 verify(mPreferenceCategory, atLeastOnce()).setVisible(captor.capture()); in onChildUpdated_subscriptionsBecameAvailable_categoryIsVisible() 139 List<Boolean> values = captor.getAllValues(); in onChildUpdated_subscriptionsBecameAvailable_categoryIsVisible() 156 ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); in onChildUpdated_subscriptionsBecameUnavailable_categoryIsNotVisible() local 158 verify(mPreferenceCategory, atLeastOnce()).setVisible(captor.capture()); in onChildUpdated_subscriptionsBecameUnavailable_categoryIsNotVisible() 159 List<Boolean> values = captor.getAllValues(); in onChildUpdated_subscriptionsBecameUnavailable_categoryIsNotVisible()
|
D | MobileNetworkSummaryControllerTest.java | 310 final ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); in addButton_oneSubscriptionAirplaneModeTurnedOn_addButtonGetsDisabled() local 311 verify(mPreference, atLeastOnce()).setAddWidgetEnabled(captor.capture()); in addButton_oneSubscriptionAirplaneModeTurnedOn_addButtonGetsDisabled() 312 assertThat(captor.getValue()).isFalse(); in addButton_oneSubscriptionAirplaneModeTurnedOn_addButtonGetsDisabled() 325 final ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); in onResume_oneSubscriptionAirplaneMode_isDisabled() local 326 verify(mPreference, atLeastOnce()).setAddWidgetEnabled(captor.capture()); in onResume_oneSubscriptionAirplaneMode_isDisabled() 327 assertThat(captor.getValue()).isFalse(); in onResume_oneSubscriptionAirplaneMode_isDisabled() 372 final ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); in onAirplaneModeChanged_oneSubscriptionAirplaneModeGetsTurnedOff_isEnabled() local 374 verify(mPreference, atLeastOnce()).setAddWidgetEnabled(captor.capture()); in onAirplaneModeChanged_oneSubscriptionAirplaneModeGetsTurnedOff_isEnabled() 375 assertThat(captor.getValue()).isTrue(); in onAirplaneModeChanged_oneSubscriptionAirplaneModeGetsTurnedOff_isEnabled()
|
D | SubscriptionsPreferenceControllerTest.java | 232 final ArgumentCaptor<Preference> captor = ArgumentCaptor.forClass(Preference.class); in onSubscriptionsChanged_subscriptionReplaced_preferencesChanged() local 233 verify(mPreferenceCategory, times(2)).addPreference(captor.capture()); in onSubscriptionsChanged_subscriptionReplaced_preferencesChanged() 234 assertThat(captor.getAllValues().size()).isEqualTo(2); in onSubscriptionsChanged_subscriptionReplaced_preferencesChanged() 235 assertThat(captor.getAllValues().get(0).getTitle()).isEqualTo("sub1"); in onSubscriptionsChanged_subscriptionReplaced_preferencesChanged() 236 assertThat(captor.getAllValues().get(1).getTitle()).isEqualTo("sub2"); in onSubscriptionsChanged_subscriptionReplaced_preferencesChanged() 246 verify(mPreferenceCategory).removePreference(captor.capture()); in onSubscriptionsChanged_subscriptionReplaced_preferencesChanged() 247 assertThat(captor.getValue().getTitle()).isEqualTo("sub2"); in onSubscriptionsChanged_subscriptionReplaced_preferencesChanged() 248 verify(mPreferenceCategory, times(3)).addPreference(captor.capture()); in onSubscriptionsChanged_subscriptionReplaced_preferencesChanged() 249 assertThat(captor.getValue().getTitle()).isEqualTo("sub3"); in onSubscriptionsChanged_subscriptionReplaced_preferencesChanged()
|
/packages/apps/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/autofill/ |
D | AutofillPickerFragmentTest.java | 86 ArgumentCaptor<Preference> captor = ArgumentCaptor.forClass(Preference.class); in selectedService() local 87 verify(mPreferenceScreen, times(1)).addPreference(captor.capture()); in selectedService() 88 RadioPreference pref = (RadioPreference) captor.getValue(); in selectedService() 101 ArgumentCaptor<Preference> captor = ArgumentCaptor.forClass(Preference.class); in selectedNone() local 102 verify(mPreferenceScreen, times(1)).addPreference(captor.capture()); in selectedNone() 103 RadioPreference pref = (RadioPreference) captor.getValue(); in selectedNone()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/telephony/ |
D | CarrierPreferenceControllerTest.java | 133 final ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in handlePreferenceClick_activityFound_openCarrierSettingActivity() local 134 verify(mContext).startActivity(captor.capture()); in handlePreferenceClick_activityFound_openCarrierSettingActivity() 135 final Intent intent = captor.getValue(); in handlePreferenceClick_activityFound_openCarrierSettingActivity() 153 final ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in handlePreferenceClick_activityNotFound_DoNothing() local 154 verify(mContext, never()).startActivity(captor.capture()); in handlePreferenceClick_activityNotFound_DoNothing() 167 final ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in handlePreferenceClick_activityNotConfigured_DoNothing() local 168 verify(mContext, never()).startActivity(captor.capture()); in handlePreferenceClick_activityNotConfigured_DoNothing()
|
D | EuiccPreferenceControllerTest.java | 70 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in handlePreferenceTreeClick_startActivity() local 71 doNothing().when(mContext).startActivity(captor.capture()); in handlePreferenceTreeClick_startActivity() 75 assertThat(captor.getValue().getAction()).isEqualTo( in handlePreferenceTreeClick_startActivity()
|
D | DataServiceSetupPreferenceControllerTest.java | 125 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in handlePreferenceTreeClick_startActivity() local 126 doNothing().when(mContext).startActivity(captor.capture()); in handlePreferenceTreeClick_startActivity() 130 final Intent intent = captor.getValue(); in handlePreferenceTreeClick_startActivity()
|
/packages/modules/NetworkStack/tests/integration/src/android/net/ip/ |
D | IpClientIntegrationTest.java | 502 ArgumentCaptor<OnAlarmListener> captor = ArgumentCaptor.forClass(OnAlarmListener.class); 505 contains(tagMatch), captor.capture(), eq(mIpc.getHandler())); 506 return captor.getValue(); 794 final ArgumentCaptor<LinkProperties> captor = ArgumentCaptor.forClass(LinkProperties.class); 795 verify(mCb, timeout(TEST_TIMEOUT_MS)).onProvisioningSuccess(captor.capture()); 796 LinkProperties lp = captor.getValue(); 1163 ArgumentCaptor<LinkProperties> captor = ArgumentCaptor.forClass(LinkProperties.class); 1164 verify(mCb, timeout(TEST_TIMEOUT_MS)).onProvisioningSuccess(captor.capture()); 1165 assertEquals(SERVER_ADDR, captor.getValue().getDhcpServerAddress()); 1430 ArgumentCaptor<LinkProperties> captor = ArgumentCaptor.forClass(LinkProperties.class); [all …]
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/accounts/ |
D | ChooseAccountPreferenceControllerTest.java | 212 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in onPreferenceClick_shouldStartActivity() local 214 verify(mHelper.getMockFragmentController()).startActivityForResult(captor.capture(), in onPreferenceClick_shouldStartActivity() 217 Intent intent = captor.getValue(); in onPreferenceClick_shouldStartActivity() 229 ArgumentCaptor<ActivityResultCallback> captor = ArgumentCaptor.forClass( in onAccountAdded_shouldGoBack() local 233 anyInt(), captor.capture()); in onAccountAdded_shouldGoBack() 235 ActivityResultCallback callback = captor.getValue(); in onAccountAdded_shouldGoBack()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/ |
D | BluetoothEnablerTest.java | 210 ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass(BroadcastReceiver.class); in bluetoothTurnsOff_switchTurnsOff() local 211 when(mContext.registerReceiver(captor.capture(), any(IntentFilter.class))).thenReturn(null); in bluetoothTurnsOff_switchTurnsOff() 219 BroadcastReceiver receiver = captor.getValue(); in bluetoothTurnsOff_switchTurnsOff() 234 ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass(BroadcastReceiver.class); in bluetoothTurnsOn_switchTurnsOn() local 235 when(mContext.registerReceiver(captor.capture(), any(IntentFilter.class))).thenReturn(null); in bluetoothTurnsOn_switchTurnsOn() 242 BroadcastReceiver receiver = captor.getValue(); in bluetoothTurnsOn_switchTurnsOn()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/ |
D | AdvancedPowerUsageDetailTest.java | 199 final ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in setUp() local 202 mBundle = captor.getValue().getBundleExtra(EXTRA_SHOW_FRAGMENT_ARGUMENTS); in setUp() 205 doAnswer(callable).when(mActivity).startActivityAsUser(captor.capture(), in setUp() 207 doAnswer(callable).when(mActivity).startActivity(captor.capture()); in setUp() 342 final ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in testStartBatteryDetailPage_noBatteryUsage_hasBasicData() local 346 verify(mActivity).startActivity(captor.capture()); in testStartBatteryDetailPage_noBatteryUsage_hasBasicData() 348 assertThat(captor.getValue().getBundleExtra(EXTRA_SHOW_FRAGMENT_ARGUMENTS) in testStartBatteryDetailPage_noBatteryUsage_hasBasicData() 352 assertThat(captor.getValue().getBundleExtra(EXTRA_SHOW_FRAGMENT_ARGUMENTS) in testStartBatteryDetailPage_noBatteryUsage_hasBasicData()
|
/packages/services/Telephony/tests/src/com/android/services/telephony/rcs/ |
D | RcsFeatureControllerTest.java | 163 ArgumentCaptor<IImsRegistrationCallback> captor = in testFeatureManagerConnectedHelper() local 165 verify(mFeatureManager).registerImsRegistrationCallback(captor.capture()); in testFeatureManagerConnectedHelper() 166 assertNotNull(captor.getValue()); in testFeatureManagerConnectedHelper() 168 captor.getValue().onDeregistered(REASON_DISCONNECTED); in testFeatureManagerConnectedHelper() 175 captor.getValue().onRegistering(ImsRegistrationImplBase.REGISTRATION_TECH_LTE); in testFeatureManagerConnectedHelper() 183 captor.getValue().onRegistered(ImsRegistrationImplBase.REGISTRATION_TECH_LTE); in testFeatureManagerConnectedHelper()
|
/packages/modules/ExtServices/tests/src/android/ext/services/notification/ |
D | AssistantTest.java | 197 ArgumentCaptor<Adjustment> captor = ArgumentCaptor.forClass(Adjustment.class); in testTriggerAdjustment() local 198 verify(mNoMan, times(1)).applyEnqueuedAdjustmentFromAssistant(any(), captor.capture()); in testTriggerAdjustment() 199 assertEquals(sbn.getKey(), captor.getValue().getKey()); in testTriggerAdjustment() 201 captor.getValue().getSignals().getInt(Adjustment.KEY_USER_SENTIMENT)); in testTriggerAdjustment() 232 ArgumentCaptor<Adjustment> captor = ArgumentCaptor.forClass(Adjustment.class); in testGroupChildCanTriggerAdjustment() local 233 verify(mNoMan, times(1)).applyEnqueuedAdjustmentFromAssistant(any(), captor.capture()); in testGroupChildCanTriggerAdjustment() 234 assertEquals(sbn.getKey(), captor.getValue().getKey()); in testGroupChildCanTriggerAdjustment() 236 captor.getValue().getSignals().getInt(Adjustment.KEY_USER_SENTIMENT)); in testGroupChildCanTriggerAdjustment()
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/hal/ |
D | InputHalServiceTest.java | 255 ArgumentCaptor<KeyEvent> captor = ArgumentCaptor.forClass(KeyEvent.class); in dispatchSingleEvent() local 258 verify(mInputListener).onKeyEvent(captor.capture(), eq(DISPLAY)); in dispatchSingleEvent() 260 return captor.getValue(); in dispatchSingleEvent() 275 ArgumentCaptor<KeyEvent> captor = ArgumentCaptor.forClass(KeyEvent.class); in dispatchSingleEventWithIndents() local 279 verify(mInputListener).onKeyEvent(captor.capture(), eq(DISPLAY)); in dispatchSingleEventWithIndents() 281 return captor.getValue(); in dispatchSingleEventWithIndents()
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/network/ |
D | MobileNetworkListPreferenceControllerTest.java | 96 ArgumentCaptor<MobileNetworkFragment> captor = ArgumentCaptor.forClass( in onPreferenceClicked_launchesFragment() local 98 verify(mControllerHelper.getMockFragmentController()).launchFragment(captor.capture()); in onPreferenceClicked_launchesFragment() 100 assertThat(captor.getValue().getArguments().getInt(MobileNetworkFragment.ARG_NETWORK_SUB_ID, in onPreferenceClicked_launchesFragment()
|
/packages/apps/Car/Dialer/tests/robotests/src/com/android/car/dialer/ui/activecall/ |
D | RingingCallControllerBarFragmentTest.java | 113 ArgumentCaptor<Integer> captor = ArgumentCaptor.forClass(Integer.class); in verifyAnswerCall() local 114 verify(mMockCall).answer(captor.capture()); in verifyAnswerCall() 115 assertThat(captor.getValue()).isEqualTo(/* videoState= */0); in verifyAnswerCall()
|