/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/fonttools/Tests/ttLib/tables/ |
D | _v_h_e_a_test.py | 129 with CapturingLogHandler(log, "WARNING") as captor: 132 len([r for r in captor.records 143 with CapturingLogHandler(log, "WARNING") as captor: 146 len([r for r in captor.records 163 with CapturingLogHandler(log, "WARNING") as captor: 166 len([r for r in captor.records 177 with CapturingLogHandler(log, "WARNING") as captor: 180 len([r for r in captor.records 212 with CapturingLogHandler(log, "WARNING") as captor: 216 len([r for r in captor.records [all …]
|
D | _n_a_m_e_test.py | 49 with CapturingLogHandler(log, "WARNING") as captor: 52 len([r for r in captor.records if "string is bytes" in r.msg]) == 1) 91 with CapturingLogHandler(log, "WARNING") as captor: 103 captor.assertRegex("cannot add Windows name in language gsw-LI") 122 with CapturingLogHandler(log, "WARNING") as captor: 125 captor.assertRegex("cannot add Windows name in language la") 138 with CapturingLogHandler(log, "WARNING") as captor: 141 captor.assertRegex("cannot add Windows name in language la") 156 with CapturingLogHandler(log, "WARNING") as captor: 159 captor.assertRegex("cannot add Windows name in language az-Arab") [all …]
|
D | _h_m_t_x_test.py | 78 with CapturingLogHandler(log, "WARNING") as captor: 82 len([r for r in captor.records if msg == r.msg]) == 1) 90 with CapturingLogHandler(log, "WARNING") as captor: 94 len([r for r in captor.records if msg == r.msg]) == 1) 103 with CapturingLogHandler(log, "WARNING") as captor: 107 len([r for r in captor.records 168 with CapturingLogHandler(log, "ERROR") as captor: 173 len([r for r in captor.records
|
D | _h_h_e_a_test.py | 110 with CapturingLogHandler(log, "WARNING") as captor: 113 len([r for r in captor.records 124 with CapturingLogHandler(log, "WARNING") as captor: 127 len([r for r in captor.records 153 with CapturingLogHandler(log, "WARNING") as captor: 157 len([r for r in captor.records
|
D | T_S_I__1_test.py | 116 with CapturingLogHandler(table.log, "WARNING") as captor: 121 assert any("textOffset > totalLength" in r.msg for r in captor.records) 176 with CapturingLogHandler(table.log, "WARNING") as captor: 178 captor.assertRegex("nextTextOffset > totalLength")
|
D | otConverters_test.py | 25 with CapturingLogHandler(otConverters.log, "WARNING") as captor: 30 [r.msg for r in captor.records]) 39 with CapturingLogHandler(otConverters.log, "WARNING") as captor: 43 [r.msg for r in captor.records]) 47 with CapturingLogHandler(otConverters.log, "WARNING") as captor: 51 [r.msg for r in captor.records]) 141 with CapturingLogHandler(otConverters.log, "WARNING") as captor: 145 [r.msg for r in captor.records])
|
D | TupleVariation_test.py | 105 with CapturingLogHandler(log, "ERROR") as captor: 107 self.assertIn("bad delta format", [r.msg for r in captor.records]) 161 with CapturingLogHandler(log, "WARNING") as captor: 165 [r.msg for r in captor.records]) 446 with CapturingLogHandler(log, "WARNING") as captor: 450 [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 …]
|
D | NettyHandlerTestBase.java | 343 ArgumentCaptor<ByteBuf> captor = ArgumentCaptor.forClass(ByteBuf.class); in captureWrite() local 344 verify(ctx, atLeastOnce()).write(captor.capture(), any(ChannelPromise.class)); in captureWrite() 346 for (ByteBuf buf : captor.getAllValues()) { in captureWrite()
|
/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/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/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()
|
/external/fonttools/Tests/pens/ |
D | basePen_test.py | 148 with CapturingLogHandler(pen.log, "WARNING") as captor: 150 captor.assertRegex("glyph '.*' is missing from glyphSet; skipped")
|
/external/grpc-grpc-java/core/src/test/java/io/grpc/ |
D | ClientInterceptorsTest.java | 364 ArgumentCaptor<Status> captor = ArgumentCaptor.forClass(Status.class); in exceptionInStart() local 365 verify(listener).onClose(captor.capture(), any(Metadata.class)); in exceptionInStart() 366 assertSame(error, captor.getValue().getCause()); in exceptionInStart()
|
/external/fonttools/Tests/feaLib/ |
D | builder_test.py | 206 with CapturingLogHandler(logger, "DEBUG") as captor: 217 captor.assertRegex("Already defined position for pair yacute semicolon")
|