/external/mockito/src/test/java/org/mockitousage/matchers/ |
VarargsTest.java | 19 import org.mockito.Captor; 32 @Captor 33 private ArgumentCaptor<String> captor; field in class:VarargsTest 193 verify(mock).varargs(captor.capture()); 195 assertThat(captor).isEmpty(); 203 verify(mock).varargs(captor.capture()); 205 assertThat(captor).areExactly(1, NULL); 217 verify(mock).varargs(captor.capture()); 218 assertThat(captor).areExactly(1, NULL); 225 verify(mock).varargs(captor.capture()) [all...] |
CapturingArgumentsTest.java | 185 ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class); local 192 verify(mock).simpleMethod(captor.capture(), eq(1)); 193 assertEquals(1, captor.getAllValues().size()); 194 assertEquals("foo", captor.getValue());
|
/external/mockito/src/test/java/org/mockitousage/verification/ |
VerificationAfterDelayTest.java | 14 import org.mockito.Captor; 46 @Captor 47 private ArgumentCaptor<Character> captor; field in class:VerificationAfterDelayTest 140 verify(mock, after(200).atMost(n)).oneArg((char) captor.capture()); 143 assertThat(captor.getAllValues()).containsExactly('0', '1', '2'); 155 verify(mock, after(200).times(n)).oneArg((char) captor.capture()); 156 assertEquals(n, captor.getAllValues().size()); 157 assertEquals('0', (char) captor.getAllValues().get(0)); 158 assertEquals('1', (char) captor.getAllValues().get(1)); 159 assertEquals('2', (char) captor.getAllValues().get(2)) [all...] |
/cts/tests/app/src/android/app/cts/ |
FragmentReceiveResultTest.java | 57 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); local 59 .onActivityResult(eq(10), eq(Activity.RESULT_OK), captor.capture()); 60 final String data = captor.getValue() 69 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); local 71 .onActivityResult(eq(20), eq(Activity.RESULT_CANCELED), captor.capture()); 72 final String data = captor.getValue() 81 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); local 83 .onActivityResult(eq(30), eq(Activity.RESULT_OK), captor.capture()); 84 final String data = captor.getValue() 93 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class) local [all...] |
/external/mockito/src/test/java/org/mockitousage/bugs/ |
CaptorAnnotationAutoboxingTest.java | 10 import org.mockito.Captor; 27 @Captor ArgumentCaptor<Double> captor; field in class:CaptorAnnotationAutoboxingTest 35 verify(fun).doFun(captor.capture()); 36 assertEquals(1.0, captor.getValue()); 39 @Captor ArgumentCaptor<Integer> intCaptor;
|
/external/mockito/src/test/java/org/mockito/ |
ArgumentCaptorTest.java | 31 ArgumentCaptor<Object> captor = ArgumentCaptor.forClass(Object.class); local 32 assertThat(captor.capture()).isNull();
|
/external/mockito/src/test/java/org/mockitousage/annotation/ |
CaptorAnnotationBasicTest.java | 10 import org.mockito.Captor; 59 ArgumentCaptor<Person> captor = ArgumentCaptor.forClass(Person.class); local 60 verify(peopleRepository).save(captor.capture()); 61 assertEquals("Wes", captor.getValue().getName()); 62 assertEquals("Williams", captor.getValue().getSurname()); 65 @Captor ArgumentCaptor<Person> captor; field in class:CaptorAnnotationBasicTest 73 verify(peopleRepository).save(captor.capture()); 74 assertEquals("Wes", captor.getValue().getName()); 75 assertEquals("Williams", captor.getValue().getSurname()) [all...] |
WrongSetOfAnnotationsTest.java | 56 @Mock @Captor ArgumentCaptor<?> captor; 63 @Spy @Captor ArgumentCaptor<?> captor; 70 @InjectMocks @Captor ArgumentCaptor<?> captor;
|
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/ |
CallAudioManagerTest.java | 92 ArgumentCaptor<CallAudioModeStateMachine.MessageArgs> captor = local 99 eq(CallAudioModeStateMachine.NO_MORE_RINGING_CALLS), captor.capture()); 109 assertMessageArgEquality(correctArgs, captor.getValue()); 111 eq(CallAudioModeStateMachine.NEW_ACTIVE_OR_DIALING_CALL), captor.capture()); 112 assertMessageArgEquality(correctArgs, captor.getValue()); 153 ArgumentCaptor<CallAudioModeStateMachine.MessageArgs> captor = 160 eq(CallAudioModeStateMachine.NO_MORE_RINGING_CALLS), captor.capture()); 170 assertMessageArgEquality(correctArgs, captor.getValue()); 172 eq(CallAudioModeStateMachine.NEW_ACTIVE_OR_DIALING_CALL), captor.capture()); 173 assertMessageArgEquality(correctArgs, captor.getValue()) [all...] |
DirectToVoicemailCallFilterTest.java | 104 ArgumentCaptor<CallerInfoLookupHelper.OnQueryCompleteListener> captor = local 106 verify(mCallerInfoLookupHelper).startLookup(eq(handle), captor.capture()); 107 return captor.getValue();
|
CallScreeningServiceFilterTest.java | 216 ArgumentCaptor<ICallScreeningAdapter> captor = local 218 verify(mCallScreeningService).screenCall(captor.capture(), nullable(ParcelableCall.class)); 219 return captor.getValue();
|
CallLogManagerTest.java | 652 ArgumentCaptor<CountryListener> captor = verifyCountryIso(mockDetector, resultIso); local 655 CountryListener listener = captor.getValue(); 664 ArgumentCaptor<CountryListener> captor = ArgumentCaptor.forClass(CountryListener.class); local 665 verify(mockDetector).addCountryListener(captor.capture(), any(Looper.class)); 667 return captor; 697 ArgumentCaptor<ContentValues> captor = ArgumentCaptor.forClass(ContentValues.class); local [all...] |
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/external/ |
TileServicesTest.java | 83 ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); local 84 Mockito.verify(mManagers.get(i), Mockito.times(1)).setBindAllowed(captor.capture()); 87 (boolean) captor.getValue()); 97 ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); local 98 Mockito.verify(mManagers.get(i), Mockito.times(2)).setBindAllowed(captor.capture()); 101 (boolean) captor.getValue()); 118 ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); local 119 Mockito.verify(mManagers.get(i), Mockito.times(1)).setBindAllowed(captor.capture()); 121 assertTrue(captor.getValue());
|
TileServiceManagerTest.java | 97 ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); local 98 Mockito.verify(mTileLifecycle, Mockito.times(1)).setBindService(captor.capture()); 99 assertTrue((boolean) captor.getValue()); 108 captor = ArgumentCaptor.forClass(Boolean.class); 109 Mockito.verify(mTileLifecycle, Mockito.times(2)).setBindService(captor.capture()); 110 assertFalse((boolean) captor.getValue());
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/power/ |
PowerNotificationWarningsTest.java | 113 ArgumentCaptor<Notification> captor = ArgumentCaptor.forClass(Notification.class); local 116 captor.capture(), any()); 117 assertEquals(null, captor.getValue().sound); 123 ArgumentCaptor<Notification> captor = ArgumentCaptor.forClass(Notification.class); local 126 captor.capture(), any()); 127 assertNotEqual(null, captor.getValue().sound);
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/util/ |
ChannelsTest.java | 62 ArgumentCaptor<List> captor = ArgumentCaptor.forClass(List.class); local 63 verify(mMockNotificationManager).createNotificationChannels(captor.capture()); 64 final List<NotificationChannel> list = captor.getValue();
|
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/ |
EdgeEffectTests.java | 173 ArgumentCaptor<Paint> captor = ArgumentCaptor.forClass(Paint.class); local 178 verify(canvas).drawCircle(anyFloat(), anyFloat(), anyFloat(), captor.capture()); 179 int oldAlpha = captor.getValue().getAlpha(); 188 verify(canvas).drawCircle(anyFloat(), anyFloat(), anyFloat(), captor.capture()); 189 int newAlpha = captor.getValue().getAlpha();
|
/frameworks/support/compat/tests/java/android/support/v4/content/pm/ |
ShortcutManagerCompatTest.java | 117 ArgumentCaptor<ShortcutInfo> captor = ArgumentCaptor.forClass(ShortcutInfo.class); local 118 verify(mockShortcutManager, times(1)).requestPinShortcut(captor.capture(), 120 assertEquals("test-id", captor.getValue().getId()); 141 ArgumentCaptor<ShortcutInfo> captor = ArgumentCaptor.forClass(ShortcutInfo.class); local 142 verify(mockShortcutManager, times(1)).createShortcutResultIntent(captor.capture()); 143 assertEquals("test-id", captor.getValue().getId());
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ |
ImsSMSDispatcherTest.java | 149 ArgumentCaptor<byte[]> captor = ArgumentCaptor.forClass(byte[].class); local 155 verify(mSimulatedCommandsVerifier).sendImsCdmaSms(captor.capture(), eq(0), eq(0), 157 assertEquals(1, captor.getAllValues().size()); 158 assertNull(captor.getAllValues().get(0));
|
/frameworks/base/services/tests/servicestests/src/com/android/server/policy/ |
AccessibilityShortcutControllerTest.java | 329 ArgumentCaptor<DialogInterface.OnClickListener> captor = local 332 captor.capture()); 334 captor.getValue().onClick(null, 0); 346 ArgumentCaptor<DialogInterface.OnClickListener> captor = local 349 captor.capture()); 351 if (captor.getValue() != null) { 352 captor.getValue().onClick(null, 0);
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/ |
AdvancedPowerUsageDetailTest.java | 160 final ArgumentCaptor<Bundle> captor = ArgumentCaptor.forClass(Bundle.class); local 165 mBundle = captor.getValue(); 170 captor.capture(), anyInt(), any(), any()); 284 final ArgumentCaptor<Bundle> captor = ArgumentCaptor.forClass(Bundle.class); local 288 mBundle = captor.getValue(); 293 captor.capture(), anyInt(), any(), any());
|
/packages/apps/StorageManager/robotests/src/com/android/storagemanager/automatic/ |
NotificationControllerTest.java | 163 ArgumentCaptor<Notification> captor = ArgumentCaptor.forClass(Notification.class); local 166 verify(mNotificationManager).notify(anyInt(), captor.capture()); 167 assertThat(captor.getValue().flags & Notification.FLAG_LOCAL_ONLY)
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/ |
CallbackHandlerTest.java | 70 ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); local 71 Mockito.verify(mEmengencyListener).setEmergencyCallsOnly(captor.capture()); 72 assertTrue(captor.getValue());
|
/frameworks/base/tests/net/java/com/android/server/connectivity/ |
IpConnectivityMetricsTest.java | 414 ArgumentCaptor<ConnectivityMetricsEvent> captor = local 416 verify(mMockService, timeout(timeoutMs).times(n)).logEvent(captor.capture()); 417 return captor.getAllValues();
|
/packages/apps/Launcher3/tests/src/com/android/launcher3/model/ |
BaseModelUpdateTaskTestCase.java | 111 ArgumentCaptor<Runnable> captor = ArgumentCaptor.forClass(Runnable.class); local 112 verify(mockHandler, atLeast(0)).post(captor.capture()); 114 return captor.getAllValues();
|