/external/mockito/src/test/java/org/mockitousage/matchers/ |
D | VarargsTest.java | 38 private ArgumentCaptor<String> captor; field in VarargsTest 198 verify(mock).varargs(captor.capture()); in shouldCaptureVarArgs_noArgs() 200 assertThat(captor).isEmpty(); in shouldCaptureVarArgs_noArgs() 208 verify(mock).varargs(captor.capture()); in shouldCaptureVarArgs_oneNullArg_eqNull() 210 assertThat(captor).areExactly(1, NULL); in shouldCaptureVarArgs_oneNullArg_eqNull() 222 verify(mock).varargs(captor.capture()); in shouldCaptureVarArgs_nullArrayArg() 223 assertThat(captor).areExactly(1, NULL); in shouldCaptureVarArgs_nullArrayArg() 230 verify(mock).varargs(captor.capture()); in shouldCaptureVarArgs_twoArgsOneCapture() 232 assertThat(captor).contains("1", "2"); in shouldCaptureVarArgs_twoArgsOneCapture() 239 verify(mock).varargs(captor.capture(), captor.capture()); in shouldCaptureVarArgs_twoArgsTwoCaptures() [all …]
|
D | CapturingArgumentsTest.java | 185 ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class); in should_capture_when_full_arg_list_matches() local 192 verify(mock).simpleMethod(captor.capture(), eq(1)); in should_capture_when_full_arg_list_matches() 193 assertEquals(1, captor.getAllValues().size()); in should_capture_when_full_arg_list_matches() 194 assertEquals("foo", captor.getValue()); in should_capture_when_full_arg_list_matches()
|
/external/mockito/src/test/java/org/mockitousage/verification/ |
D | VerificationWithAfterAndCaptorTest.java | 32 @Captor private ArgumentCaptor<Character> captor; field in VerificationWithAfterAndCaptorTest 50 verify(mock, after(200).atMost(n)).oneArg((char) captor.capture()); in shouldReturnListOfArgumentsWithSameSizeAsGivenInAtMostVerification() 53 assertThat(captor.getAllValues()).containsExactly('0', '1', '2'); in shouldReturnListOfArgumentsWithSameSizeAsGivenInAtMostVerification() 66 verify(mock, after(200).times(n)).oneArg((char) captor.capture()); in shouldReturnListOfArgumentsWithSameSizeAsGivenInTimesVerification() 67 assertEquals(n, captor.getAllValues().size()); in shouldReturnListOfArgumentsWithSameSizeAsGivenInTimesVerification() 68 assertEquals('0', (char) captor.getAllValues().get(0)); in shouldReturnListOfArgumentsWithSameSizeAsGivenInTimesVerification() 69 assertEquals('1', (char) captor.getAllValues().get(1)); in shouldReturnListOfArgumentsWithSameSizeAsGivenInTimesVerification() 70 assertEquals('2', (char) captor.getAllValues().get(2)); in shouldReturnListOfArgumentsWithSameSizeAsGivenInTimesVerification() 83 verify(mock, after(200).atLeast(n)).oneArg((char) captor.capture()); in shouldReturnListOfArgumentsWithSameSizeAsGivenInAtLeastVerification() 84 assertEquals(n, captor.getAllValues().size()); in shouldReturnListOfArgumentsWithSameSizeAsGivenInAtLeastVerification() [all …]
|
/external/mockito/src/test/java/org/mockitousage/annotation/ |
D | CaptorAnnotationBasicTest.java | 59 ArgumentCaptor<Person> captor = ArgumentCaptor.forClass(Person.class); in shouldUseCaptorInOrdinaryWay() local 60 verify(peopleRepository).save(captor.capture()); in shouldUseCaptorInOrdinaryWay() 61 assertEquals("Wes", captor.getValue().getName()); in shouldUseCaptorInOrdinaryWay() 62 assertEquals("Williams", captor.getValue().getSurname()); in shouldUseCaptorInOrdinaryWay() 65 @Captor ArgumentCaptor<Person> captor; field in CaptorAnnotationBasicTest 73 verify(peopleRepository).save(captor.capture()); in shouldUseAnnotatedCaptor() 74 assertEquals("Wes", captor.getValue().getName()); in shouldUseAnnotatedCaptor() 75 assertEquals("Williams", captor.getValue().getSurname()); in shouldUseAnnotatedCaptor()
|
D | WrongSetOfAnnotationsTest.java | 56 @Mock @Captor ArgumentCaptor<?> captor; in should_not_allow_Captor_and_Mock() 63 @Spy @Captor ArgumentCaptor<?> captor; in should_not_allow_Captor_and_Spy() 70 @InjectMocks @Captor ArgumentCaptor<?> captor; in should_not_allow_Captor_and_InjectMocks()
|
/external/libtextclassifier/java/tests/instrumentation/src/com/android/textclassifier/ |
D | DefaultTextClassifierServiceTest.java | 121 ArgumentCaptor<TextClassification> captor = ArgumentCaptor.forClass(TextClassification.class); in classifyText_success() local 122 verify(textClassificationCallback).onSuccess(captor.capture()); in classifyText_success() 123 assertThat(captor.getValue().getEntityCount()).isGreaterThan(0); in classifyText_success() 124 assertThat(captor.getValue().getEntity(0)).isEqualTo(TextClassifier.TYPE_URL); in classifyText_success() 143 ArgumentCaptor<TextSelection> captor = ArgumentCaptor.forClass(TextSelection.class); in suggestSelection_success() local 144 verify(textSelectionCallback).onSuccess(captor.capture()); in suggestSelection_success() 145 assertThat(captor.getValue().getEntityCount()).isGreaterThan(0); in suggestSelection_success() 146 assertThat(captor.getValue().getEntity(0)).isEqualTo(TextClassifier.TYPE_URL); in suggestSelection_success() 158 ArgumentCaptor<TextLinks> captor = ArgumentCaptor.forClass(TextLinks.class); in generateLinks_success() local 159 verify(textLinksCallback).onSuccess(captor.capture()); in generateLinks_success() [all …]
|
/external/fonttools/Tests/ttLib/tables/ |
D | _v_h_e_a_test.py | 127 with CapturingLogHandler(log, "WARNING") as captor: 130 len([r for r in captor.records 141 with CapturingLogHandler(log, "WARNING") as captor: 144 len([r for r in captor.records 161 with CapturingLogHandler(log, "WARNING") as captor: 164 len([r for r in captor.records 175 with CapturingLogHandler(log, "WARNING") as captor: 178 len([r for r in captor.records 210 with CapturingLogHandler(log, "WARNING") as captor: 214 len([r for r in captor.records [all …]
|
D | _h_m_t_x_test.py | 75 with CapturingLogHandler(log, "WARNING") as captor: 79 len([r for r in captor.records if msg == r.msg]) == 1) 87 with CapturingLogHandler(log, "WARNING") as captor: 91 len([r for r in captor.records if msg == r.msg]) == 1) 100 with CapturingLogHandler(log, "WARNING") as captor: 104 len([r for r in captor.records 165 with CapturingLogHandler(log, "ERROR") as captor: 170 len([r for r in captor.records
|
D | _n_a_m_e_test.py | 48 with CapturingLogHandler(log, "WARNING") as captor: 51 len([r for r in captor.records if "string is bytes" in r.msg]) == 1) 215 with CapturingLogHandler(log, "WARNING") as captor: 227 captor.assertRegex("cannot add Windows name in language gsw-LI") 246 with CapturingLogHandler(log, "WARNING") as captor: 249 captor.assertRegex("cannot add Windows name in language la") 262 with CapturingLogHandler(log, "WARNING") as captor: 265 captor.assertRegex("cannot add Windows name in language la") 280 with CapturingLogHandler(log, "WARNING") as captor: 283 captor.assertRegex("cannot add Windows name in language az-Arab") [all …]
|
D | _h_h_e_a_test.py | 108 with CapturingLogHandler(log, "WARNING") as captor: 111 len([r for r in captor.records 122 with CapturingLogHandler(log, "WARNING") as captor: 125 len([r for r in captor.records 163 with CapturingLogHandler(log, "WARNING") as captor: 167 len([r for r in captor.records
|
D | T_S_I__1_test.py | 113 with CapturingLogHandler(table.log, "WARNING") as captor: 118 assert any("textOffset > totalLength" in r.msg for r in captor.records) 173 with CapturingLogHandler(table.log, "WARNING") as captor: 175 captor.assertRegex("nextTextOffset > totalLength")
|
D | otConverters_test.py | 21 with CapturingLogHandler(otConverters.log, "WARNING") as captor: 26 [r.msg for r in captor.records]) 35 with CapturingLogHandler(otConverters.log, "WARNING") as captor: 39 [r.msg for r in captor.records]) 43 with CapturingLogHandler(otConverters.log, "WARNING") as captor: 47 [r.msg for r in captor.records]) 137 with CapturingLogHandler(otConverters.log, "WARNING") as captor: 141 [r.msg for r in captor.records])
|
D | TupleVariation_test.py | 110 with CapturingLogHandler(log, "ERROR") as captor: 112 self.assertIn("bad delta format", [r.msg for r in captor.records]) 182 with CapturingLogHandler(log, "WARNING") as captor: 186 [r.msg for r in captor.records]) 483 with CapturingLogHandler(log, "WARNING") as captor: 487 [r.msg for r in captor.records])
|
/external/grpc-grpc-java/netty/src/test/java/io/grpc/netty/ |
D | NettyClientStreamTest.java | 268 ArgumentCaptor<CancelClientStreamCommand> captor = ArgumentCaptor in inboundTrailersBeforeHalfCloseSendsRstStream() local 270 verify(writeQueue).enqueue(captor.capture(), eq(true)); in inboundTrailersBeforeHalfCloseSendsRstStream() 271 assertNull(captor.getValue().reason()); in inboundTrailersBeforeHalfCloseSendsRstStream() 291 ArgumentCaptor<Status> captor = ArgumentCaptor.forClass(Status.class); in inboundStatusShouldSetStatus() local 292 verify(listener).closed(captor.capture(), same(PROCESSED), any(Metadata.class)); in inboundStatusShouldSetStatus() 293 assertEquals(Status.INTERNAL.getCode(), captor.getValue().getCode()); in inboundStatusShouldSetStatus() 316 ArgumentCaptor<Status> captor = ArgumentCaptor.forClass(Status.class); in invalidInboundHeadersCancelStream() local 318 verify(listener).closed(captor.capture(), same(PROCESSED), metadataCaptor.capture()); in invalidInboundHeadersCancelStream() 319 assertEquals(Status.UNKNOWN.getCode(), captor.getValue().getCode()); in invalidInboundHeadersCancelStream() 335 ArgumentCaptor<Status> captor = ArgumentCaptor.forClass(Status.class); in invalidInboundContentTypeShouldCancelStream() local [all …]
|
D | NettyClientHandlerTest.java | 311 ArgumentCaptor<Metadata> captor = ArgumentCaptor.forClass(Metadata.class); in inboundShouldForwardToStream() local 312 verify(streamListener).headersRead(captor.capture()); in inboundShouldForwardToStream() 314 captor.getValue().get(Metadata.Key.of("magic", Metadata.ASCII_STRING_MARSHALLER))); in inboundShouldForwardToStream() 381 ArgumentCaptor<Status> captor = ArgumentCaptor.forClass(Status.class); in receivedGoAwayShouldFailUnknownStreams() local 382 verify(streamListener).closed(captor.capture(), same(REFUSED), notNull(Metadata.class)); in receivedGoAwayShouldFailUnknownStreams() 383 assertEquals(Status.CANCELLED.getCode(), captor.getValue().getCode()); in receivedGoAwayShouldFailUnknownStreams() 385 captor.getValue().getDescription()); in receivedGoAwayShouldFailUnknownStreams() 488 ArgumentCaptor<Status> captor = ArgumentCaptor.forClass(Status.class); in channelShutdownShouldFailInFlightStreams() local 489 verify(streamListener).closed(captor.capture(), same(PROCESSED), notNull(Metadata.class)); in channelShutdownShouldFailInFlightStreams() 490 assertEquals(Status.UNAVAILABLE.getCode(), captor.getValue().getCode()); in channelShutdownShouldFailInFlightStreams() [all …]
|
D | NettyServerHandlerTest.java | 325 ArgumentCaptor<Status> captor = ArgumentCaptor.forClass(Status.class); in streamErrorShouldNotCloseChannel() local 326 verify(streamListener).closed(captor.capture()); in streamErrorShouldNotCloseChannel() 327 assertEquals(e, captor.getValue().asException().getCause()); in streamErrorShouldNotCloseChannel() 328 assertEquals(Code.UNKNOWN, captor.getValue().getCode()); in streamErrorShouldNotCloseChannel() 360 ArgumentCaptor<Status> captor = ArgumentCaptor.forClass(Status.class); in channelInactiveShouldCloseStreams() local 361 verify(streamListener).closed(captor.capture()); in channelInactiveShouldCloseStreams() 362 assertFalse(captor.getValue().isOk()); in channelInactiveShouldCloseStreams() 370 ArgumentCaptor<Http2Settings> captor = ArgumentCaptor.forClass(Http2Settings.class); in shouldAdvertiseMaxConcurrentStreams() local 372 any(ChannelHandlerContext.class), captor.capture(), any(ChannelPromise.class)); in shouldAdvertiseMaxConcurrentStreams() 374 assertEquals(maxConcurrentStreams, captor.getValue().maxConcurrentStreams().intValue()); in shouldAdvertiseMaxConcurrentStreams() [all …]
|
/external/mockito/src/test/java/org/mockitousage/bugs/ |
D | CaptorAnnotationAutoboxingTest.java | 27 @Captor ArgumentCaptor<Double> captor; field in CaptorAnnotationAutoboxingTest 35 verify(fun).doFun(captor.capture()); in shouldAutoboxSafely() 36 assertEquals(Double.valueOf(1.0), captor.getValue()); in shouldAutoboxSafely()
|
/external/ims/rcs/presencepolling/tests/src/com/android/service/ims/presence/ |
D | PollingServiceTests.java | 68 ArgumentCaptor<IntentFilter> captor = ArgumentCaptor.forClass(IntentFilter.class); in testRegisterCarrierConfigReceiver() local 69 verify(mTestContext).registerReceiver(eq(mReceiver), captor.capture()); in testRegisterCarrierConfigReceiver() 70 IntentFilter f = captor.getValue(); in testRegisterCarrierConfigReceiver()
|
/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/ |
D | TestUtils.java | 71 final BlockingQueue<MockClientTransportInfo> captor = in captureTransports() local 86 captor.add(new MockClientTransportInfo( in captureTransports() 98 return captor; in captureTransports()
|
/external/fonttools/Tests/feaLib/ |
D | builder_test.py | 211 with CapturingLogHandler(logger, "INFO") as captor: 218 captor.assertRegex('Removing duplicate single substitution from glyph "A" to "A.sc"') 233 with CapturingLogHandler(logger, "INFO") as captor: 240 …captor.assertRegex(r"Removing duplicate multiple substitution from glyph \"f_f_i\" to \('f', 'f', … 245 with CapturingLogHandler(logger, "DEBUG") as captor: 256 captor.assertRegex("Already defined position for pair yacute semicolon") 786 with CapturingLogHandler(logger, level='WARNING') as captor: 795 captor.assertRegex( 824 with CapturingLogHandler(logger, "DEBUG") as captor: 830 captor.assertRegex('Already defined position for pair A V at')
|
/external/mockito/src/test/java/org/mockito/ |
D | ArgumentCaptorTest.java | 31 ArgumentCaptor<Object> captor = ArgumentCaptor.forClass(Object.class); in tell_handy_return_values_to_return_value_for() local 32 assertThat(captor.capture()).isNull(); in tell_handy_return_values_to_return_value_for()
|
/external/fonttools/Tests/otlLib/ |
D | mock_builder_test.py | 72 with CapturingLogHandler(logger, "INFO") as captor: 77 captor.assertRegex('5:beta: unsupported "subtable" statement for lookup type')
|
/external/fonttools/Tests/cu2qu/ |
D | ufo_test.py | 48 with CapturingLogHandler(logger, "INFO") as captor: 50 assert captor.assertRegex("New spline lengths:") 55 with CapturingLogHandler(logger, "INFO") as captor: 57 assert captor.assertRegex("already converted")
|
/external/grpc-grpc-java/okhttp/src/test/java/io/grpc/okhttp/ |
D | OkHttpClientTransportTest.java | 547 ArgumentCaptor<Buffer> captor = ArgumentCaptor.forClass(Buffer.class); in writeMessage() local 549 .data(eq(false), eq(3), captor.capture(), eq(12 + HEADER_LENGTH)); in writeMessage() 550 Buffer sentFrame = captor.getValue(); in writeMessage() 864 ArgumentCaptor<Buffer> captor = in receiveGoAway() local 867 .data(eq(false), eq(3), captor.capture(), eq(22 + HEADER_LENGTH)); in receiveGoAway() 868 Buffer sentFrame = captor.getValue(); in receiveGoAway() 952 ArgumentCaptor<Buffer> captor = ArgumentCaptor.forClass(Buffer.class); in pendingStreamSucceed() local 954 .data(eq(false), eq(5), captor.capture(), eq(5 + HEADER_LENGTH)); in pendingStreamSucceed() 955 Buffer sentFrame = captor.getValue(); in pendingStreamSucceed() 1433 ArgumentCaptor<Buffer> captor = ArgumentCaptor.forClass(Buffer.class); in writeBeforeConnected() local [all …]
|
/external/opencensus-java/exporters/trace/jaeger/src/test/java/io/opencensus/exporter/trace/jaeger/ |
D | JaegerExporterHandlerTest.java | 63 @Captor private ArgumentCaptor<List<Span>> captor; field in JaegerExporterHandlerTest 86 verify(mockSender).send(eq(process), captor.capture()); in exportShouldConvertFromSpanDataToJaegerThriftSpan() 87 List<Span> spans = captor.getValue(); in exportShouldConvertFromSpanDataToJaegerThriftSpan()
|