/external/mockito/src/test/java/org/mockitousage/stubbing/ |
D | StubbingUsingDoReturnTest.java | 37 doReturn("foo").when(mock).simpleMethod(); in should_stub() 38 doReturn("bar").when(mock).simpleMethod(); in should_stub() 45 doReturn("foo").when(mock).simpleMethod("foo"); in should_stub_with_args() 46 doReturn("bar").when(mock).simpleMethod(eq("one"), anyInt()); in should_stub_with_args() 89 doReturn("foo").when(mock).voidMethod(); in should_scream_when_return_set_for_void() 101 doReturn("foo").when("foo").toString(); in should_scream_when_not_a_mock_passed() 111 doReturn("foo").when((Object) null).toString(); in should_scream_when_null_passed() 120 doReturn("foo") in should_allow_chained_stubbing() 122 .doReturn("bar") in should_allow_chained_stubbing() 137 doReturn("foo", "bar") in should_allow_consecutive_return_values() [all …]
|
D | StubbingWithDelegateTest.java | 21 import static org.mockito.Mockito.doReturn; 75 doReturn(10).when(mock).size(); in when_stubbed_the_delegate_should_not_be_called() 89 doReturn(false).when(mockedList).add(Mockito.anyString()); in delegate_should_not_be_called_when_stubbed2()
|
/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/ |
D | RetriableStreamTest.java | 33 import static org.mockito.Mockito.doReturn; 196 doReturn(mockStream1).when(retriableStreamRecorder).newSubstream(0); in retry_everythingDrained() 250 doReturn(mockStream2).when(retriableStreamRecorder).newSubstream(1); in retry_everythingDrained() 294 doReturn(mockStream3).when(retriableStreamRecorder).newSubstream(2); in retry_everythingDrained() 344 doReturn(mockStream1).when(retriableStreamRecorder).newSubstream(0); in headersRead_cancel() 365 doReturn(mockStream1).when(retriableStreamRecorder).newSubstream(0); in retry_headersRead_cancel() 376 doReturn(mockStream2).when(retriableStreamRecorder).newSubstream(1); in retry_headersRead_cancel() 400 doReturn(mockStream1).when(retriableStreamRecorder).newSubstream(0); in headersRead_closed() 424 doReturn(mockStream1).when(retriableStreamRecorder).newSubstream(0); in retry_headersRead_closed() 435 doReturn(mockStream2).when(retriableStreamRecorder).newSubstream(1); in retry_headersRead_closed() [all …]
|
D | KeepAliveManagerTest.java | 22 import static org.mockito.Mockito.doReturn; 82 doReturn(shutdownFuture) in sendKeepAlivePings() 109 doReturn(future) in keepAlivePingDelayedByIncomingData() 177 doReturn(shutdownFuture) in onTransportTerminationCancelsShutdownFuture() 199 doReturn(shutdownFuture) in keepAlivePingTimesOut() 226 doReturn(pingFuture) in transportGoesIdle() 287 doReturn(shutdownFuture) in transportGoesIdleAfterPingSent() 313 doReturn(pingFuture) in transportGoesIdleBeforePingSent() 332 doReturn(pingFuture) in transportShutsdownAfterPingScheduled() 353 doReturn(shutdownFuture) in transportShutsdownAfterPingSent() [all …]
|
/external/mockito/src/main/java/org/mockito/internal/stubbing/ |
D | DefaultLenientStubber.java | 44 public Stubber doReturn(Object toBeReturned) { in doReturn() method in DefaultLenientStubber 45 return stubber().doReturn(toBeReturned); in doReturn() 49 public Stubber doReturn(Object toBeReturned, Object... nextToBeReturned) { in doReturn() method in DefaultLenientStubber 50 return stubber().doReturn(toBeReturned, nextToBeReturned); in doReturn()
|
/external/mockito/src/test/java/org/mockitousage/ |
D | CompilationWarningsTest.java | 23 doReturn(null).when(mock(IMethods.class)).objectReturningMethodNoArgs(); in no_warnings_for_most_common_api() 24 doReturn("a", 12).when(mock(IMethods.class)).objectReturningMethodNoArgs(); in no_warnings_for_most_common_api() 25 doReturn(1000).when(mock(IMethods.class)).objectReturningMethodNoArgs(); in no_warnings_for_most_common_api() 30 doAnswer(ignore()).doReturn(null).when(mock(IMethods.class)).objectReturningMethodNoArgs(); in no_warnings_for_most_common_api() 31 … doAnswer(ignore()).doReturn("a", 12).when(mock(IMethods.class)).objectReturningMethodNoArgs(); in no_warnings_for_most_common_api() 32 doAnswer(ignore()).doReturn(1000).when(mock(IMethods.class)).objectReturningMethodNoArgs(); in no_warnings_for_most_common_api() 94 doReturn(null, (Object[]) null).when(mock(IMethods.class)).objectReturningMethodNoArgs(); in unchecked_confusing_null_argument_warnings() 95 …doAnswer(ignore()).doReturn(null, (Object[]) null).when(mock(IMethods.class)).objectReturningMetho… in unchecked_confusing_null_argument_warnings()
|
/external/opencensus-java/exporters/stats/stackdriver/src/test/java/io/opencensus/exporter/stats/stackdriver/ |
D | StackdriverExporterWorkerTest.java | 24 import static org.mockito.Mockito.doReturn; 101 doReturn(mockCreateMetricDescriptorCallable).when(mockStub).createMetricDescriptorCallable(); in setUp() 102 doReturn(mockCreateTimeSeriesCallable).when(mockStub).createTimeSeriesCallable(); in setUp() 103 doReturn(null) in setUp() 106 doReturn(null).when(mockCreateTimeSeriesCallable).call(any(CreateTimeSeriesRequest.class)); in setUp() 127 doReturn(ImmutableSet.of(view)).when(mockViewManager).getAllExportedViews(); in export() 128 doReturn(viewData).when(mockViewManager).getView(VIEW_NAME); in export() 174 doReturn(ImmutableSet.of(view)).when(mockViewManager).getAllExportedViews(); in doNotExportForEmptyViewData() 175 doReturn(empty).when(mockViewManager).getView(VIEW_NAME); in doNotExportForEmptyViewData() 195 doReturn(ImmutableSet.of(view)).when(mockViewManager).getAllExportedViews(); in doNotExportIfFailedToRegisterView()
|
/external/dexmaker/dexmaker-mockito-inline-extended-tests/src/main/java/com/android/dx/mockito/inline/extended/tests/ |
D | MockStatic.java | 22 import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn; 101 doReturn("23").when(() -> Settings.Global.getString(any in spyStatic() 104 doReturn(42).when(() -> Settings.Global.getInt(any in spyStatic() 310 doReturn("fakeB").when(SuperClass::returnB); in doReturnMockWithTwoClasses() 313 doReturn("fakeD").when(() -> SubClass.record("test")); in doReturnMockWithTwoClasses() 324 doReturn("fakeB").doReturn("fakeB2").when(SuperClass::returnB); in doReturnTwice() 340 doReturn("faceRecord").when(() -> SubClass.record(eq("test"))); in doReturnSpyHasNoSideEffect() 358 doReturn("").when(() -> { in onlyOneMethodCallDuringStubbing() 382 doReturn("").when(() -> { in atLeastOneMethodCallDuringStubbing()
|
D | StaticMockitoSession.java | 28 import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn; 41 doReturn("23").when(() -> Settings.Global.getString(any in strictUnnecessaryStubbing() 59 doReturn("23").when(() -> Settings.Global.getString(any in lenientUnnecessaryStubbing()
|
/external/dexmaker/dexmaker-mockito-inline-extended/src/main/java/com/android/dx/mockito/inline/extended/ |
D | StaticCapableStubber.java | 188 public StaticCapableStubber doReturn(Object toBeReturned) { in doReturn() method in StaticCapableStubber 189 instanceStubber = instanceStubber.doReturn(toBeReturned); in doReturn() 194 public StaticCapableStubber doReturn(Object toBeReturned, Object... nextToBeReturned) { in doReturn() method in StaticCapableStubber 195 instanceStubber = instanceStubber.doReturn(toBeReturned, nextToBeReturned); in doReturn()
|
D | ExtendedMockito.java | 104 public static StaticCapableStubber doReturn(Object toBeReturned) { in doReturn() method in ExtendedMockito 105 return new StaticCapableStubber(Mockito.doReturn(toBeReturned)); in doReturn() 113 public static StaticCapableStubber doReturn(Object toBeReturned, Object... toBeReturnedNext) { in doReturn() method in ExtendedMockito 114 return new StaticCapableStubber(Mockito.doReturn(toBeReturned, toBeReturnedNext)); in doReturn()
|
/external/opencensus-java/contrib/zpages/src/test/java/io/opencensus/contrib/zpages/ |
D | RpczZPageHandlerTest.java | 23 import static org.mockito.Mockito.doReturn; 69 doReturn( in emitSummaryTableForEachMethod() 76 doReturn( in emitSummaryTableForEachMethod() 84 doReturn( in emitSummaryTableForEachMethod()
|
/external/opencensus-java/exporters/stats/prometheus/src/test/java/io/opencensus/exporter/stats/prometheus/ |
D | PrometheusStatsCollectorTest.java | 21 import static org.mockito.Mockito.doReturn; 96 doReturn(ImmutableSet.of(VIEW)).when(mockViewManager).getAllExportedViews(); in setUp() 97 doReturn(VIEW_DATA).when(mockViewManager).getView(VIEW_NAME); in setUp() 142 doReturn(ImmutableSet.of(VIEW_WITH_LE_TAG_KEY)).when(mockViewManager).getAllExportedViews(); in testCollect_SkipDistributionViewWithLeTagKey() 143 doReturn(VIEW_DATA_WITH_LE_TAG_KEY).when(mockViewManager).getView(VIEW_NAME); in testCollect_SkipDistributionViewWithLeTagKey()
|
/external/mockito/src/test/java/org/mockito/internal/listeners/ |
D | StubbingLookupNotifierTest.java | 20 import static org.mockito.Mockito.doReturn; 35 doReturn(emptyList()).when(creationSettings).getStubbingLookupListeners(); in does_not_do_anything_when_list_is_empty() 49 doReturn(listeners).when(creationSettings).getStubbingLookupListeners(); in call_on_stubbing_lookup_method_of_listeners_with_correct_event()
|
/external/grpc-grpc-java/testing/src/test/java/io/grpc/testing/ |
D | GrpcCleanupRuleTest.java | 25 import static org.mockito.Mockito.doReturn; 151 doReturn(true).when(resource1).awaitReleased(anyLong(), any(TimeUnit.class)); in multiResource_cleanupGracefully() 152 doReturn(true).when(resource2).awaitReleased(anyLong(), any(TimeUnit.class)); in multiResource_cleanupGracefully() 153 doReturn(true).when(resource3).awaitReleased(anyLong(), any(TimeUnit.class)); in multiResource_cleanupGracefully() 219 doReturn(true).when(resource1).awaitReleased(anyLong(), any(TimeUnit.class)); in multiResource_awaitReleasedFails() 220 doReturn(false).when(resource2).awaitReleased(anyLong(), any(TimeUnit.class)); in multiResource_awaitReleasedFails() 221 doReturn(true).when(resource3).awaitReleased(anyLong(), any(TimeUnit.class)); in multiResource_awaitReleasedFails() 265 doReturn(true).when(resource1).awaitReleased(anyLong(), any(TimeUnit.class)); in multiResource_awaitReleasedInterrupted() 268 doReturn(true).when(resource3).awaitReleased(anyLong(), any(TimeUnit.class)); in multiResource_awaitReleasedInterrupted()
|
/external/mockito/src/main/java/org/mockito/stubbing/ |
D | BaseStubber.java | 103 Stubber doReturn(Object toBeReturned); in doReturn() method 115 Stubber doReturn(Object toBeReturned, Object... nextToBeReturned); in doReturn() method
|
/external/mockito/src/main/java/org/mockito/ |
D | BDDMockito.java | 433 return new BDDStubberImpl(mockitoStubber.doReturn(toBeReturned)); in willReturn() 437 … return new BDDStubberImpl(mockitoStubber.doReturn(toBeReturned).doReturn(nextToBeReturned)); in willReturn() 510 return new BDDStubberImpl(Mockito.doReturn(toBeReturned)); in willReturn() 519 return new BDDStubberImpl(Mockito.doReturn(toBeReturned, toBeReturnedNext)); in willReturn()
|
D | Mockito.java | 2481 public static Stubber doReturn(Object toBeReturned) { in doReturn() method in Mockito 2482 return MOCKITO_CORE.stubber().doReturn(toBeReturned); in doReturn() 2536 public static Stubber doReturn(Object toBeReturned, Object... toBeReturnedNext) { in doReturn() method in Mockito 2537 return MOCKITO_CORE.stubber().doReturn(toBeReturned, toBeReturnedNext); in doReturn()
|
/external/mockito/src/test/java/org/mockitousage/strictness/ |
D | StrictnessPerStubbingTest.java | 62 lenient().doReturn("2").doReturn("3") in doReturn_syntax() 76 lenient().doReturn("2", "3") in doReturn_varargs_syntax() 237 lenient().doReturn("2").when(mock).differentMethod("2"); in unnecessary_stubbing_with_doReturn()
|
/external/guava/guava-tests/test/com/google/common/util/concurrent/ |
D | ForwardingObjectTester.java | 20 import static org.mockito.Mockito.doReturn; 66 T stubber = doReturn(delegate).when(mock); in testForwardingObject()
|
/external/guava/android/guava-tests/test/com/google/common/util/concurrent/ |
D | ForwardingObjectTester.java | 20 import static org.mockito.Mockito.doReturn; 66 T stubber = doReturn(delegate).when(mock); in testForwardingObject()
|
/external/grpc-grpc-java/core/src/test/java/io/grpc/util/ |
D | RoundRobinLoadBalancerTest.java | 38 import static org.mockito.Mockito.doReturn; 415 doReturn(headerWithStickinessValue).when(mockArgs).getHeaders(); in noStickinessEnabled_withStickyHeader() 445 doReturn(new Metadata()).when(mockArgs).getHeaders(); in stickinessEnabled_withoutStickyHeader() 480 doReturn(headerWithStickinessValue).when(mockArgs).getHeaders(); in stickinessEnabled_withStickyHeader() 516 doReturn(headerWithStickinessValue1).when(mockArgs).getHeaders(); in stickinessEnabled_withDifferentStickyHeaders() 519 doReturn(headerWithStickinessValue2).when(mockArgs).getHeaders(); in stickinessEnabled_withDifferentStickyHeaders() 522 doReturn(headerWithStickinessValue1).when(mockArgs).getHeaders(); in stickinessEnabled_withDifferentStickyHeaders() 525 doReturn(headerWithStickinessValue2).when(mockArgs).getHeaders(); in stickinessEnabled_withDifferentStickyHeaders() 555 doReturn(headerWithStickinessValue).when(mockArgs).getHeaders(); in stickiness_goToTransientFailure_pick_backToReady() 603 doReturn(headerWithStickinessValue1).when(mockArgs).getHeaders(); in stickiness_goToTransientFailure_backToReady_pick() [all …]
|
/external/grpc-grpc-java/core/src/test/java/io/grpc/ |
D | ForwardingChannelBuilderTest.java | 20 import static org.mockito.Mockito.doReturn; 80 doReturn(mockChannel).when(mockDelegate).build(); in buildReturnsDelegateBuildByDefualt()
|
/external/apache-commons-compress/src/test/java/org/apache/commons/compress/compressors/z/ |
D | ZCompressorInputStreamTest.java | 34 import static org.powermock.api.mockito.PowerMockito.doReturn; 61 doReturn(false).when(enumeration).hasMoreElements(); in testFailsToCreateZCompressorInputStreamAndThrowsIOException()
|
/external/grpc-grpc-java/auth/src/test/java/io/grpc/auth/ |
D | ClientAuthInterceptorTest.java | 24 import static org.mockito.Mockito.doReturn; 103 doReturn("localhost:443").when(channel).authority(); in startUp() 171 doReturn("example.com:443").when(channel).authority(); in verifyServiceUri() 177 doReturn("example.com:123").when(channel).authority(); in verifyServiceUri()
|