/external/mockito/src/org/mockito/ |
Captor.java | 16 * @Captor ArgumentCaptor<AsyncCallback<Foo>> captor;
25 * verify(mock.doStuff(captor.capture()));
26 * assertEquals("foo", captor.getValue());
32 * One of the advantages of using @Captor annotation is that you can avoid warnings related capturing complex generic types.
40 public @interface Captor {}
|
ArgumentCaptor.java | 29 * Using ArgumentCaptor with stubbing may decrease test readability because captor is created outside of assert (aka verify or 'then') block.
48 * There is an <strong>annotation</strong> that you might find useful: @{@link Captor}
52 * @see Captor
|
MockitoAnnotations.java | 56 * Read also about other annotations @{@link Spy}, @{@link Captor}, @{@link InjectMocks} 85 * @{@link org.mockito.Mock}, @{@link Spy}, @{@link Captor}, @{@link InjectMocks}
|
/external/mockito/src/org/mockito/internal/configuration/ |
CaptorAnnotationProcessor.java | 8 import org.mockito.Captor; 15 * Instantiate {@link ArgumentCaptor} a field annotated by @Captor. 17 public class CaptorAnnotationProcessor implements FieldAnnotationProcessor<Captor> { 18 public Object process(Captor annotation, Field field) { 21 throw new MockitoException("@Captor field must be of the type ArgumentCaptor.\n" + "Field: '" 23 + "For info how to use @Captor annotations see examples in javadoc for MockitoAnnotations class.");
|
DefaultAnnotationEngine.java | 7 import org.mockito.Captor;
21 * Initializes fields annotated with @{@link org.mockito.Mock} or @{@link org.mockito.Captor}.
35 registerAnnotationProcessor(Captor.class, new CaptorAnnotationProcessor());
|
SpyAnnotationEngine.java | 50 assertNoIncompatibleAnnotations(Spy.class, field, Mock.class, org.mockito.MockitoAnnotations.Mock.class, Captor.class);
|
/external/testng/src/test/java/test/pholser/ |
Captor.java | 9 * @version $Id: Captor.java,v 1.3 2004/08/26 22:25:22 cedric Exp $ 11 public class Captor { 12 private static Captor instance = null; 15 public static Captor instance() { 17 instance = new Captor(); 23 // System.out.println("@@PHOLSER RESETTING CAPTOR");
|
Saboteur.java | 16 Captor.reset(); 17 Captor.instance().capture( "Saboteur.setUpFixture" ); 22 Captor.instance().capture( "Saboteur.setUp" ); 27 Captor.instance().capture( "Saboteur.tearDown" ); 32 Captor.instance().capture( "Saboteur.tearDownFixture" );
|
Demo.java | 19 Captor.reset(); 20 Captor.instance().capture( "Demo.setUpFixture" ); 25 Captor.instance().capture( "Demo.setUp" ); 30 Captor.instance().capture( "Demo.tearDown" ); 36 final List<String> actual = Captor.instance().captives(); 43 final List<String> actual = Captor.instance().captives();
|
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/ |
CallAudioManagerTest.java | 87 ArgumentCaptor<CallAudioModeStateMachine.MessageArgs> captor = local 94 eq(CallAudioModeStateMachine.NO_MORE_RINGING_CALLS), captor.capture()); 104 assertMessageArgEquality(correctArgs, captor.getValue()); 106 eq(CallAudioModeStateMachine.NEW_ACTIVE_OR_DIALING_CALL), captor.capture()); 107 assertMessageArgEquality(correctArgs, captor.getValue()); 122 ArgumentCaptor<CallAudioModeStateMachine.MessageArgs> captor = local 127 eq(CallAudioModeStateMachine.MT_AUDIO_SPEEDUP_FOR_RINGING_CALL), captor.capture()); 137 assertMessageArgEquality(correctArgs, captor.getValue()); 138 assertMessageArgEquality(correctArgs, captor.getValue()); 156 ArgumentCaptor<CallAudioModeStateMachine.MessageArgs> captor local 203 ArgumentCaptor<CallAudioModeStateMachine.MessageArgs> captor = local 222 ArgumentCaptor<CallAudioModeStateMachine.MessageArgs> captor = local 249 ArgumentCaptor<CallAudioModeStateMachine.MessageArgs> captor = local [all...] |
DirectToVoicemailCallFilterTest.java | 86 ArgumentCaptor<CallerInfoLookupHelper.OnQueryCompleteListener> captor = local 88 verify(mCallerInfoLookupHelper).startLookup(eq(TEST_HANDLE), captor.capture()); 89 return captor.getValue();
|
CallScreeningServiceFilterTest.java | 215 ArgumentCaptor<ICallScreeningAdapter> captor = local 217 verify(mCallScreeningService).screenCall(captor.capture(), any(ParcelableCall.class)); 218 return captor.getValue();
|
CallLogManagerTest.java | 639 ArgumentCaptor<CountryListener> captor = verifyCountryIso(mockDetector, resultIso); local 642 CountryListener listener = captor.getValue(); 651 ArgumentCaptor<CountryListener> captor = ArgumentCaptor.forClass(CountryListener.class); local 652 verify(mockDetector).addCountryListener(captor.capture(), any(Looper.class)); 654 return captor; 678 ArgumentCaptor<ContentValues> captor = ArgumentCaptor.forClass(ContentValues.class); local 682 .insert(any(String.class), eq(uri), captor.capture()); 687 return captor.getValue(); [all...] |
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/external/ |
TileServicesTests.java | 67 ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); local 68 Mockito.verify(mManagers.get(i), Mockito.times(1)).setBindAllowed(captor.capture()); 71 (boolean) captor.getValue()); 80 ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); local 81 Mockito.verify(mManagers.get(i), Mockito.times(2)).setBindAllowed(captor.capture()); 84 (boolean) captor.getValue()); 100 ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); local 101 Mockito.verify(mManagers.get(i), Mockito.times(1)).setBindAllowed(captor.capture()); 103 assertTrue(captor.getValue());
|
TileServiceManagerTests.java | 86 ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); local 87 Mockito.verify(mTileLifecycle, Mockito.times(1)).setBindService(captor.capture()); 88 assertTrue((boolean) captor.getValue()); 97 captor = ArgumentCaptor.forClass(Boolean.class); 98 Mockito.verify(mTileLifecycle, Mockito.times(2)).setBindService(captor.capture()); 99 assertFalse((boolean) captor.getValue());
|
/external/littlemock/src/com/google/testing/littlemock/ |
Captor.java | 29 * @Captor private ArgumentCaptor<String> mCaptureString; 40 public @interface Captor {
|
ArgumentCaptor.java | 35 /** Use this argument captor to perform the capture. */
|
/external/mockito/src/org/mockito/internal/configuration/injection/scanner/ |
InjectMocksScanner.java | 7 import org.mockito.Captor; 53 assertNoAnnotations(field, Mock.class, MockitoAnnotations.Mock.class, Captor.class);
|
/external/mockito/src/org/mockito/configuration/ |
AnnotationEngine.java | 13 * Configures mock creation logic behind @Mock, @Captor and @Spy annotations
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ |
ImsSMSDispatcherTest.java | 144 ArgumentCaptor<byte[]> captor = ArgumentCaptor.forClass(byte[].class); local 150 verify(mSimulatedCommandsVerifier).sendImsCdmaSms(captor.capture(), eq(0), eq(0), 152 assertEquals(1, captor.getAllValues().size()); 153 assertNull(captor.getAllValues().get(0));
|
/packages/apps/Camera2/tests_camera/src/com/android/camera/activity/ |
CameraTestCase.java | 43 import com.google.testing.littlemock.Captor; 63 @Captor private ArgumentCaptor<ShutterCallback> mShutterCallback; 64 @Captor private ArgumentCaptor<PictureCallback> mRawPictureCallback; 65 @Captor private ArgumentCaptor<PictureCallback> mJpegPictureCallback; 66 @Captor private ArgumentCaptor<AutoFocusCallback> mAutoFocusCallback;
|
/developers/samples/android/security/AsymmetricFingerprintDialog/Application/src/test/java/com/example/android/fingerprintdialog/ |
FingerprintUiHelperTest.java | 7 import org.mockito.Captor; 43 @Captor private ArgumentCaptor<Runnable> mRunnableArgumentCaptor;
|
/external/caliper/caliper/src/test/java/com/google/caliper/config/ |
LoggingConfigLoaderTest.java | 35 import org.mockito.Captor; 59 @Captor ArgumentCaptor<Handler> handlerCaptor;
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/ |
CallbackHandlerTest.java | 62 ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); local 63 Mockito.verify(mEmengencyListener).setEmergencyCallsOnly(captor.capture()); 64 assertTrue(captor.getValue());
|
/packages/apps/Settings/tests/unit/src/com/android/settings/ |
TetherServiceTest.java | 64 import org.mockito.Captor; 102 @Captor private ArgumentCaptor<PendingIntent> mPiCaptor; 103 @Captor private ArgumentCaptor<String> mStoredTypes;
|