Home
last modified time | relevance | path

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

12

/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/
DNotificationGutsManagerTest.java198 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in testAppOpsSettingsIntent_camera() local
199 verify(mPresenter, times(1)).startNotificationGutsIntent(captor.capture(), anyInt(), any()); in testAppOpsSettingsIntent_camera()
200 assertEquals(Intent.ACTION_MANAGE_APP_PERMISSIONS, captor.getValue().getAction()); in testAppOpsSettingsIntent_camera()
208 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in testAppOpsSettingsIntent_mic() local
209 verify(mPresenter, times(1)).startNotificationGutsIntent(captor.capture(), anyInt(), any()); in testAppOpsSettingsIntent_mic()
210 assertEquals(Intent.ACTION_MANAGE_APP_PERMISSIONS, captor.getValue().getAction()); in testAppOpsSettingsIntent_mic()
219 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in testAppOpsSettingsIntent_camera_mic() local
220 verify(mPresenter, times(1)).startNotificationGutsIntent(captor.capture(), anyInt(), any()); in testAppOpsSettingsIntent_camera_mic()
221 assertEquals(Intent.ACTION_MANAGE_APP_PERMISSIONS, captor.getValue().getAction()); in testAppOpsSettingsIntent_camera_mic()
229 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in testAppOpsSettingsIntent_overlay() local
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/external/
DTileServicesTest.java85 ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); in testRecalculateBindAllowance() local
86 Mockito.verify(mManagers.get(i), Mockito.times(1)).setBindAllowed(captor.capture()); in testRecalculateBindAllowance()
89 (boolean) captor.getValue()); in testRecalculateBindAllowance()
99 ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); in testSetMemoryPressure() local
100 Mockito.verify(mManagers.get(i), Mockito.times(2)).setBindAllowed(captor.capture()); in testSetMemoryPressure()
103 (boolean) captor.getValue()); in testSetMemoryPressure()
120 ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); in testCalcFew() local
121 Mockito.verify(mManagers.get(i), Mockito.times(1)).setBindAllowed(captor.capture()); in testCalcFew()
123 assertTrue(captor.getValue()); in testCalcFew()
DTileServiceManagerTest.java97 ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); in testBind() local
98 Mockito.verify(mTileLifecycle, Mockito.times(1)).setBindService(captor.capture()); in testBind()
99 assertTrue((boolean) captor.getValue()); in testBind()
108 captor = ArgumentCaptor.forClass(Boolean.class); in testBind()
109 Mockito.verify(mTileLifecycle, Mockito.times(2)).setBindService(captor.capture()); in testBind()
110 assertFalse((boolean) captor.getValue()); in testBind()
/frameworks/support/swiperefreshlayout/src/androidTest/java/androidx/swiperefreshlayout/widget/
DCircularProgressDrawableTest.java72 ArgumentCaptor<RectF> captor = ArgumentCaptor.forClass(RectF.class); in sizeIsSquareBasedOnSmallerEdgeWithNoCenterRadius() local
73 verify(mMockCanvas).drawArc(captor.capture(), anyFloat(), anyFloat(), anyBoolean(), in sizeIsSquareBasedOnSmallerEdgeWithNoCenterRadius()
76 assertTrue(captor.getValue().width() == captor.getValue().height()); in sizeIsSquareBasedOnSmallerEdgeWithNoCenterRadius()
77 assertTrue(captor.getValue().width() <= width); in sizeIsSquareBasedOnSmallerEdgeWithNoCenterRadius()
78 assertTrue(captor.getValue().width() <= height); in sizeIsSquareBasedOnSmallerEdgeWithNoCenterRadius()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DWakeupOnboardingTest.java129 ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass(BroadcastReceiver.class); in dismissNotificationAction_setsOnboarded() local
130 verify(mContext).registerReceiver(captor.capture(), any(IntentFilter.class), any(), in dismissNotificationAction_setsOnboarded()
132 BroadcastReceiver broadcastReceiver = captor.getValue(); in dismissNotificationAction_setsOnboarded()
150 ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass(BroadcastReceiver.class); in turnOffWifiWakeAction_setsOnboardedAndTurnsOffWifiWake() local
151 verify(mContext).registerReceiver(captor.capture(), any(IntentFilter.class), any(), in turnOffWifiWakeAction_setsOnboardedAndTurnsOffWifiWake()
153 BroadcastReceiver broadcastReceiver = captor.getValue(); in turnOffWifiWakeAction_setsOnboardedAndTurnsOffWifiWake()
174 ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass(BroadcastReceiver.class); in openWifiSettingsAction_setsOnboardedAndOpensWifiSettings() local
175 verify(mContext).registerReceiver(captor.capture(), any(IntentFilter.class), any(), in openWifiSettingsAction_setsOnboardedAndOpensWifiSettings()
177 BroadcastReceiver broadcastReceiver = captor.getValue(); in openWifiSettingsAction_setsOnboardedAndOpensWifiSettings()
DScoringParamsTest.java326 ArgumentCaptor<ContentObserver> captor = ArgumentCaptor.forClass(ContentObserver.class);
331 .registerContentObserver(eq(mContext), any(), anyBoolean(), captor.capture());
339 captor.getValue().onChange(/*selfChange*/ false);
344 captor.getValue().onChange(/*selfChange*/ false);
350 ArgumentCaptor<ContentObserver> captor = ArgumentCaptor.forClass(ContentObserver.class);
355 .registerContentObserver(eq(mContext), any(), anyBoolean(), captor.capture());
362 captor.getValue().onChange(/*selfChange*/ false);
DWakeupControllerTest.java132 ArgumentCaptor<WakeupConfigStoreData> captor = in initializeWakeupController() local
134 verify(mWifiConfigStore).registerStoreData(captor.capture()); in initializeWakeupController()
135 mWakeupConfigStoreData = captor.getValue(); in initializeWakeupController()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
DExtensionControllerImplTest.java116 ArgumentCaptor<ConfigurationListener> captor = ArgumentCaptor.forClass( in testUiMode() local
118 verify(mConfigurationController).addCallback(captor.capture()); in testUiMode()
122 captor.getValue().onConfigChanged(c); in testUiMode()
127 captor.getValue().onConfigChanged(c); in testUiMode()
132 verify(mConfigurationController).removeCallback(eq(captor.getValue())); in testUiMode()
163 ArgumentCaptor<ConfigurationListener> captor = ArgumentCaptor.forClass( in testSortOrder() local
165 verify(mConfigurationController).addCallback(captor.capture()); in testSortOrder()
168 captor.getValue().onConfigChanged(c); in testSortOrder()
DCallbackHandlerTest.java70 ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); in testEmergencyListener() local
71 Mockito.verify(mEmengencyListener).setEmergencyCallsOnly(captor.capture()); in testEmergencyListener()
72 assertTrue(captor.getValue()); in testEmergencyListener()
/frameworks/base/tests/net/java/android/net/
DConnectivityManagerTest.java212 ArgumentCaptor<Messenger> captor = ArgumentCaptor.forClass(Messenger.class); in testCallbackRelease() local
215 when(mService.requestNetwork(any(), captor.capture(), anyInt(), any(), anyInt())) in testCallbackRelease()
220 captor.getValue().send(makeMessage(request, ConnectivityManager.CALLBACK_AVAILABLE)); in testCallbackRelease()
229 captor.getValue().send(makeMessage(request, ConnectivityManager.CALLBACK_LOSING)); in testCallbackRelease()
240 ArgumentCaptor<Messenger> captor = ArgumentCaptor.forClass(Messenger.class); in testCallbackRecycling() local
243 when(mService.requestNetwork(any(), captor.capture(), anyInt(), any(), anyInt())) in testCallbackRecycling()
248 captor.getValue().send(makeMessage(req1, ConnectivityManager.CALLBACK_AVAILABLE)); in testCallbackRecycling()
257 captor.getValue().send(makeMessage(req1, ConnectivityManager.CALLBACK_LOSING)); in testCallbackRecycling()
261 when(mService.requestNetwork(any(), captor.capture(), anyInt(), any(), anyInt())) in testCallbackRecycling()
266 captor.getValue().send(makeMessage(req2, ConnectivityManager.CALLBACK_LOST)); in testCallbackRecycling()
/frameworks/support/work/workmanager/src/androidTest/java/androidx/work/impl/
DWorkManagerImplTest.java847 ArgumentCaptor<List<WorkStatus>> captor = ArgumentCaptor.forClass(List.class); in testGetStatusesById() local
848 verify(mockObserver).onChanged(captor.capture()); in testGetStatusesById()
849 assertThat(captor.getValue(), is(not(nullValue()))); in testGetStatusesById()
850 assertThat(captor.getValue().size(), is(2)); in testGetStatusesById()
862 assertThat(captor.getValue(), containsInAnyOrder(workStatus0, workStatus1)); in testGetStatusesById()
867 verify(mockObserver, times(2)).onChanged(captor.capture()); in testGetStatusesById()
868 assertThat(captor.getValue(), is(not(nullValue()))); in testGetStatusesById()
869 assertThat(captor.getValue().size(), is(2)); in testGetStatusesById()
876 assertThat(captor.getValue(), containsInAnyOrder(workStatus0, workStatus1)); in testGetStatusesById()
881 verify(mockObserver).onChanged(captor.capture()); in testGetStatusesById()
[all …]
DWorkContinuationImplTest.java520 ArgumentCaptor<WorkSpec> captor = ArgumentCaptor.forClass(WorkSpec.class); in verifyScheduled() local
521 verify(scheduler, times(1)).schedule(captor.capture()); in verifyScheduled()
522 List<WorkSpec> workSpecs = captor.getAllValues(); in verifyScheduled()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/util/
DChannelsTest.java67 ArgumentCaptor<List> captor = ArgumentCaptor.forClass(List.class); in testChannelSetup() local
68 verify(mMockNotificationManager).createNotificationChannels(captor.capture()); in testChannelSetup()
69 final List<NotificationChannel> list = captor.getValue(); in testChannelSetup()
79 ArgumentCaptor<List> captor = ArgumentCaptor.forClass(List.class); in testChannelSetup_noLegacyScreenshot() local
/frameworks/support/compat/src/androidTest/java/androidx/core/content/pm/
DShortcutManagerCompatTest.java111 ArgumentCaptor<ShortcutInfo> captor = ArgumentCaptor.forClass(ShortcutInfo.class); in testRequestPinShortcut_v26() local
112 verify(mockShortcutManager, times(1)).requestPinShortcut(captor.capture(), in testRequestPinShortcut_v26()
114 assertEquals("test-id", captor.getValue().getId()); in testRequestPinShortcut_v26()
131 ArgumentCaptor<ShortcutInfo> captor = ArgumentCaptor.forClass(ShortcutInfo.class); in testCreateShortcutResultIntent_v26() local
132 verify(mockShortcutManager, times(1)).createShortcutResultIntent(captor.capture()); in testCreateShortcutResultIntent_v26()
133 assertEquals("test-id", captor.getValue().getId()); in testCreateShortcutResultIntent_v26()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DSmsDispatchersControllerTest.java141 ArgumentCaptor<byte[]> captor = ArgumentCaptor.forClass(byte[].class); in testSendRetrySmsCdmaTest() local
147 verify(mSimulatedCommandsVerifier).sendImsCdmaSms(captor.capture(), eq(0), eq(0), in testSendRetrySmsCdmaTest()
149 assertEquals(1, captor.getAllValues().size()); in testSendRetrySmsCdmaTest()
150 assertNull(captor.getAllValues().get(0)); in testSendRetrySmsCdmaTest()
/frameworks/base/packages/ExtServices/tests/src/android/ext/services/notification/
DAssistantTest.java183 ArgumentCaptor<Adjustment> captor = ArgumentCaptor.forClass(Adjustment.class); in testTriggerAdjustment() local
184 verify(mNoMan, times(1)).applyAdjustmentFromAssistant(any(), captor.capture()); in testTriggerAdjustment()
185 assertEquals(sbn.getKey(), captor.getValue().getKey()); in testTriggerAdjustment()
187 captor.getValue().getSignals().getInt(Adjustment.KEY_USER_SENTIMENT)); in testTriggerAdjustment()
218 ArgumentCaptor<Adjustment> captor = ArgumentCaptor.forClass(Adjustment.class); in testGroupChildCanTriggerAdjustment() local
219 verify(mNoMan, times(1)).applyAdjustmentFromAssistant(any(), captor.capture()); in testGroupChildCanTriggerAdjustment()
220 assertEquals(sbn.getKey(), captor.getValue().getKey()); in testGroupChildCanTriggerAdjustment()
222 captor.getValue().getSignals().getInt(Adjustment.KEY_USER_SENTIMENT)); in testGroupChildCanTriggerAdjustment()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/power/
DPowerNotificationWarningsTest.java118 ArgumentCaptor<Notification> captor = ArgumentCaptor.forClass(Notification.class); in testShowLowBatteryNotification_BatteryChannel() local
121 captor.capture(), any()); in testShowLowBatteryNotification_BatteryChannel()
122 assertTrue(captor.getValue().getChannelId() == NotificationChannels.BATTERY); in testShowLowBatteryNotification_BatteryChannel()
/frameworks/opt/telephony/tests/telephonytests/src/android/telephony/ims/
DMmTelFeatureTests.java127 ArgumentCaptor<IImsCallSession> captor = ArgumentCaptor.forClass(IImsCallSession.class); in testNewIncomingCall() local
128 verify(mListener).onIncomingCall(captor.capture(), any()); in testNewIncomingCall()
130 assertEquals(sessionBinder, captor.getValue()); in testNewIncomingCall()
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/
DUiAutomationManagerTest.java158 ArgumentCaptor<IBinder.DeathRecipient> captor = ArgumentCaptor.forClass( in uiAutomationBinderDiesBeforeConnecting_notifiesSystem() local
160 verify(mMockOwner).linkToDeath(captor.capture(), anyInt()); in uiAutomationBinderDiesBeforeConnecting_notifiesSystem()
161 captor.getValue().binderDied(); in uiAutomationBinderDiesBeforeConnecting_notifiesSystem()
/frameworks/base/core/tests/coretests/src/com/android/internal/accessibility/
DAccessibilityShortcutControllerTest.java356 ArgumentCaptor<DialogInterface.OnClickListener> captor = in testClickingDisableButtonInDialog_shouldClearShortcutId() local
359 captor.capture()); in testClickingDisableButtonInDialog_shouldClearShortcutId()
361 captor.getValue().onClick(null, 0); in testClickingDisableButtonInDialog_shouldClearShortcutId()
373 ArgumentCaptor<DialogInterface.OnClickListener> captor = in testClickingLeaveOnButtonInDialog_shouldLeaveShortcutReady() local
376 captor.capture()); in testClickingLeaveOnButtonInDialog_shouldLeaveShortcutReady()
378 if (captor.getValue() != null) { in testClickingLeaveOnButtonInDialog_shouldLeaveShortcutReady()
379 captor.getValue().onClick(null, 0); in testClickingLeaveOnButtonInDialog_shouldLeaveShortcutReady()
/frameworks/support/lifecycle/livedata/src/test/java/androidx/lifecycle/
DComputableLiveDataTest.java99 final ArgumentCaptor<Integer> captor = ArgumentCaptor.forClass(Integer.class); in noConcurrentCompute() local
121 verify(observer, timeout(2000)).onChanged(captor.capture()); in noConcurrentCompute()
122 assertThat(captor.getAllValues(), is(Collections.singletonList(2))); in noConcurrentCompute()
/frameworks/support/paging/common/src/test/java/androidx/paging/
DItemKeyedDataSourceTest.kt42 val captor = ArgumentCaptor.forClass(PageResult::class.java) in loadInitial() constant
48 verify(receiver).onPageResult(anyInt(), captor.capture()) in loadInitial()
50 assertNotNull(captor.value) in loadInitial()
51 return captor.value in loadInitial()
/frameworks/base/tests/net/java/com/android/server/connectivity/
DIpConnectivityMetricsTest.java651 ArgumentCaptor<ConnectivityMetricsEvent> captor = in verifyEvents() local
653 verify(mMockService, timeout(timeoutMs).times(n)).logEvent(captor.capture()); in verifyEvents()
654 return captor.getAllValues(); in verifyEvents()
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DSnoozeHelperTest.java74 ArgumentCaptor<Long> captor = ArgumentCaptor.forClass(Long.class); in testSnoozeForTime() local
76 anyInt(), captor.capture(), any(PendingIntent.class)); in testSnoozeForTime()
77 long actualSnoozedUntilDuration = captor.getValue() - SystemClock.elapsedRealtime(); in testSnoozeForTime()
/frameworks/support/work/workmanager/src/androidTest/java/androidx/work/impl/background/systemalarm/
DSystemAlarmDispatcherTest.java427 ArgumentCaptor<WorkSpec> captor = ArgumentCaptor.forClass(WorkSpec.class); in testReschedule() local
429 .schedule(captor.capture()); in testReschedule()
432 List<WorkSpec> workSpecs = captor.getAllValues(); in testReschedule()

12