Home
last modified time | relevance | path

Searched refs:captor (Results 1 – 25 of 59) sorted by relevance

123

/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
DCallAudioManagerTest.java104 ArgumentCaptor<CallAudioModeStateMachine.MessageArgs> captor = in testUnmuteOfSecondIncomingCall() local
111 eq(CallAudioModeStateMachine.NO_MORE_RINGING_CALLS), captor.capture()); in testUnmuteOfSecondIncomingCall()
121 assertMessageArgEquality(correctArgs, captor.getValue()); in testUnmuteOfSecondIncomingCall()
123 eq(CallAudioModeStateMachine.NEW_ACTIVE_OR_DIALING_CALL), captor.capture()); in testUnmuteOfSecondIncomingCall()
124 assertMessageArgEquality(correctArgs, captor.getValue()); in testUnmuteOfSecondIncomingCall()
166 ArgumentCaptor<CallAudioModeStateMachine.MessageArgs> captor =
173 eq(CallAudioModeStateMachine.NO_MORE_RINGING_CALLS), captor.capture());
183 assertMessageArgEquality(correctArgs, captor.getValue());
185 eq(CallAudioModeStateMachine.NEW_ACTIVE_OR_DIALING_CALL), captor.capture());
186 assertMessageArgEquality(correctArgs, captor.getValue());
[all …]
DConnectionServiceFocusManagerTest.java68 ArgumentCaptor<CallsManager.CallsManagerListener> captor = in setUp() local
70 verify(mockCallsManagerRequester).setCallsManagerListener(captor.capture()); in setUp()
71 mCallsManagerListener = captor.getValue(); in setUp()
349 ArgumentCaptor<ConnectionServiceFocusListener> captor = in getConnectionServiceFocusListener() local
351 verify(connSvrFocus).setConnectionServiceFocusListener(captor.capture()); in getConnectionServiceFocusListener()
352 return captor.getValue(); in getConnectionServiceFocusListener()
DDirectToVoicemailCallFilterTest.java118 ArgumentCaptor<CallerInfoLookupHelper.OnQueryCompleteListener> captor = in verifyLookupStart() local
120 verify(mCallerInfoLookupHelper).startLookup(eq(handle), captor.capture()); in verifyLookupStart()
121 return captor.getValue(); in verifyLookupStart()
/packages/apps/Settings/tests/robotests/src/com/android/settings/datausage/
DDataUsageSummaryPreferenceControllerTest.java159 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/
DConfigureNotificationSettingsTest.java62 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/Settings/tests/robotests/src/com/android/settings/dream/
DCurrentDreamPreferenceControllerTest.java86 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()
DStartNowPreferenceControllerTest.java72 ArgumentCaptor<OnClickListener> captor = in setsOnClickListenerForStartNow() local
76 verify(mButton).setOnClickListener(captor.capture()); in setsOnClickListenerForStartNow()
77 assertThat(captor.getValue()).isNotNull(); in setsOnClickListenerForStartNow()
/packages/apps/Car/Dialer/tests/robotests/src/com/android/car/dialer/ui/contact/
DContactListViewHolderTest.java198 ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class); in testClickCallActionButton_ContactHasOneNumber_placeCall() local
199 verify(mMockUiCallManager).placeCall(captor.capture()); in testClickCallActionButton_ContactHasOneNumber_placeCall()
200 assertThat(captor.getValue()).isEqualTo(PHONE_NUMBER_1); in testClickCallActionButton_ContactHasOneNumber_placeCall()
239 ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class); in testClickCallActionButton_HasMultipleNumbersAndPrimaryNumber_callPrimaryNumber() local
240 verify(mMockUiCallManager).placeCall(captor.capture()); in testClickCallActionButton_HasMultipleNumbersAndPrimaryNumber_callPrimaryNumber()
241 assertThat(captor.getValue()).isEqualTo(PHONE_NUMBER_2); in testClickCallActionButton_HasMultipleNumbersAndPrimaryNumber_callPrimaryNumber()
253 ArgumentCaptor<Contact> captor = ArgumentCaptor.forClass(Contact.class); in testClickShowContactDetailView_showContactDetail() local
254 verify(mMockListener).onShowContactDetail(captor.capture()); in testClickShowContactDetailView_showContactDetail()
255 assertThat(captor.getValue()).isEqualTo(mMockContact); in testClickShowContactDetailView_showContactDetail()
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/
DWifiConnectionPreferenceControllerTest.java120 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()
DMultiNetworkHeaderControllerTest.java136 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()
DMobileNetworkSummaryControllerTest.java309 final ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); in addButton_oneSubscriptionAirplaneModeTurnedOn_addButtonGetsDisabled() local
310 verify(mPreference, atLeastOnce()).setAddWidgetEnabled(captor.capture()); in addButton_oneSubscriptionAirplaneModeTurnedOn_addButtonGetsDisabled()
311 assertThat(captor.getValue()).isFalse(); in addButton_oneSubscriptionAirplaneModeTurnedOn_addButtonGetsDisabled()
324 final ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); in onResume_oneSubscriptionAirplaneMode_isDisabled() local
325 verify(mPreference, atLeastOnce()).setAddWidgetEnabled(captor.capture()); in onResume_oneSubscriptionAirplaneMode_isDisabled()
326 assertThat(captor.getValue()).isFalse(); in onResume_oneSubscriptionAirplaneMode_isDisabled()
371 final ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); in onAirplaneModeChanged_oneSubscriptionAirplaneModeGetsTurnedOff_isEnabled() local
373 verify(mPreference, atLeastOnce()).setAddWidgetEnabled(captor.capture()); in onAirplaneModeChanged_oneSubscriptionAirplaneModeGetsTurnedOff_isEnabled()
374 assertThat(captor.getValue()).isTrue(); in onAirplaneModeChanged_oneSubscriptionAirplaneModeGetsTurnedOff_isEnabled()
DSubscriptionsPreferenceControllerTest.java230 final ArgumentCaptor<Preference> captor = ArgumentCaptor.forClass(Preference.class); in onSubscriptionsChanged_subscriptionReplaced_preferencesChanged() local
231 verify(mPreferenceCategory, times(2)).addPreference(captor.capture()); in onSubscriptionsChanged_subscriptionReplaced_preferencesChanged()
232 assertThat(captor.getAllValues().size()).isEqualTo(2); in onSubscriptionsChanged_subscriptionReplaced_preferencesChanged()
233 assertThat(captor.getAllValues().get(0).getTitle()).isEqualTo("sub1"); in onSubscriptionsChanged_subscriptionReplaced_preferencesChanged()
234 assertThat(captor.getAllValues().get(1).getTitle()).isEqualTo("sub2"); in onSubscriptionsChanged_subscriptionReplaced_preferencesChanged()
244 verify(mPreferenceCategory).removePreference(captor.capture()); in onSubscriptionsChanged_subscriptionReplaced_preferencesChanged()
245 assertThat(captor.getValue().getTitle()).isEqualTo("sub2"); in onSubscriptionsChanged_subscriptionReplaced_preferencesChanged()
246 verify(mPreferenceCategory, times(3)).addPreference(captor.capture()); in onSubscriptionsChanged_subscriptionReplaced_preferencesChanged()
247 assertThat(captor.getValue().getTitle()).isEqualTo("sub3"); in onSubscriptionsChanged_subscriptionReplaced_preferencesChanged()
/packages/apps/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/autofill/
DAutofillPickerFragmentTest.java86 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/
DCarrierPreferenceControllerTest.java134 final ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in handlePreferenceClick_activityFound_openCarrierSettingActivity() local
135 verify(mContext).startActivity(captor.capture()); in handlePreferenceClick_activityFound_openCarrierSettingActivity()
136 final Intent intent = captor.getValue(); in handlePreferenceClick_activityFound_openCarrierSettingActivity()
154 final ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in handlePreferenceClick_activityNotFound_DoNothing() local
155 verify(mContext, never()).startActivity(captor.capture()); in handlePreferenceClick_activityNotFound_DoNothing()
168 final ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in handlePreferenceClick_activityNotConfigured_DoNothing() local
169 verify(mContext, never()).startActivity(captor.capture()); in handlePreferenceClick_activityNotConfigured_DoNothing()
DEuiccPreferenceControllerTest.java69 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in handlePreferenceTreeClick_startActivity() local
73 verify(mContext).startActivity(captor.capture()); in handlePreferenceTreeClick_startActivity()
74 assertThat(captor.getValue().getAction()).isEqualTo( in handlePreferenceTreeClick_startActivity()
DDataUsagePreferenceControllerTest.java93 final ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in handlePreferenceTreeClick_needDialog_showDialog() local
96 verify(mContext).startActivity(captor.capture()); in handlePreferenceTreeClick_needDialog_showDialog()
97 final Intent intent = captor.getValue(); in handlePreferenceTreeClick_needDialog_showDialog()
DDataServiceSetupPreferenceControllerTest.java127 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in handlePreferenceTreeClick_startActivity() local
131 verify(mContext).startActivity(captor.capture()); in handlePreferenceTreeClick_startActivity()
133 final Intent intent = captor.getValue(); in handlePreferenceTreeClick_startActivity()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/accounts/
DChooseAccountPreferenceControllerTest.java212 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/
DBluetoothEnablerTest.java210 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/
DAdvancedPowerUsageDetailTest.java199 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/modules/ExtServices/tests/src/android/ext/services/notification/
DAssistantTest.java197 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/
DInputHalServiceTest.java255 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/
DMobileNetworkListPreferenceControllerTest.java96 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/
DRingingCallControllerBarFragmentTest.java113 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()
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/finalization/
DDpcReceivedSuccessReceiverTest.java104 ArgumentCaptor<RemoveAccountListener> captor = in testAccountMigration()
106 verify(mUtils).removeAccountAsync(eq(mContext), eq(TEST_ACCOUNT), captor.capture()); in testAccountMigration()
107 captor.getValue().onAccountRemoved(); in testAccountMigration()

123