/external/mockito/src/test/java/org/mockitousage/bugs/ |
D | MockitoStubbedCallInAnswerTest.java | 28 when(foo.doInt()).thenAnswer(new Answer<Integer>() { in stubbing_the_right_mock() 49 when(foo.doString()).thenAnswer(new Answer<String>() { in return_type_validation() 64 when(foo.doInt()).thenAnswer(new Answer<Integer>() { in prevents_stack_overflow() 71 when(foo.doInt()).thenAnswer(new Answer<Integer>() { in prevents_stack_overflow() 84 when(foo.doInt()).thenAnswer(new Answer<Integer>() { in overriding_stubbing()
|
D | ShouldNotDeadlockAnswerExecutionTest.java | 30 Mockito.when(service.verySlowMethod()).thenAnswer(new LockingAnswer(counter)); in failIfMockIsSharedBetweenThreads() 56 Mockito.when(service1.verySlowMethod()).thenAnswer(new LockingAnswer(counter)); in successIfEveryThreadHasItsOwnMock() 57 Mockito.when(service2.verySlowMethod()).thenAnswer(new LockingAnswer(counter)); in successIfEveryThreadHasItsOwnMock()
|
/external/mockito/src/test/java/org/mockitousage/stubbing/ |
D | StubbingWithCustomAnswerTest.java | 26 when(mock.simpleMethod(anyString())).thenAnswer(new Answer<String>() { in shouldAnswer() 50 .thenAnswer(new Answer<String>() { in shouldAnswerConsecutively() 56 .thenAnswer(new Answer<String>() { in shouldAnswerConsecutively() 104 when(mock.simpleMethod(anyString())).thenAnswer(new Answer<String>() { in shouldMakeSureTheInterfaceDoesNotChange()
|
D | StubbingWithExtraAnswersTest.java | 30 … when(mock.objectReturningMethodNoArgs()).thenAnswer(AdditionalAnswers.returnsElementsOf(list)); in shouldWorkAsStandardMockito() 45 … when(mock.objectReturningMethodNoArgs()).thenAnswer(AdditionalAnswers.returnsElementsOf(list)); in shouldReturnNullIfNecessary()
|
D | CloningParameterTest.java | 43 when(emailSender.getAllEmails(new Person("Wes"))).thenAnswer(new ClonesArguments()); in shouldReturnDefaultValueWithCloningAnswer()
|
/external/mockito/src/main/java/org/mockito/internal/stubbing/ |
D | BaseStubbing.java | 20 return thenAnswer(new Returns(value)); in thenReturn() 38 return thenAnswer(new ThrowsException(throwable)); in thenThrow() 80 return thenAnswer(new CallsRealMethods()); in thenCallRealMethod()
|
D | ConsecutiveStubbing.java | 17 public OngoingStubbing<T> thenAnswer(Answer<?> answer) { in thenAnswer() method in ConsecutiveStubbing 23 return thenAnswer(answer); in then()
|
D | OngoingStubbingImpl.java | 26 public OngoingStubbing<T> thenAnswer(Answer<?> answer) { in thenAnswer() method in OngoingStubbingImpl 37 return thenAnswer(answer); in then()
|
/external/volley/src/test/java/com/android/volley/ |
D | RequestQueueIntegrationTest.java | 86 when(mMockNetwork.performRequest(higherPriorityReq)).thenAnswer(delayAnswer); in add_requestProcessedInCorrectOrder() 121 when(mMockNetwork.performRequest(req1)).thenAnswer(delayAnswer); in add_dedupeByCacheKey() 154 when(mMockNetwork.performRequest(request)).thenAnswer(delayAnswer); in add_requestFinishedListenerCanceled()
|
/external/libtextclassifier/java/tests/instrumentation/src/com/android/textclassifier/testing/ |
D | FakeContextBuilder.java | 96 .thenAnswer( in build() 105 .thenAnswer( in build()
|
/external/mockito/src/main/java/org/mockito/stubbing/ |
D | OngoingStubbing.java | 196 OngoingStubbing<T> thenAnswer(Answer<?> answer); in thenAnswer() method
|
/external/grpc-grpc-java/netty/src/test/java/io/grpc/netty/ |
D | WriteQueueTest.java | 84 when(channel.flush()).thenAnswer(new Answer<Channel>() { in setUp() 97 when(channel.write(any(QueuedCommand.class), eq(promise))).thenAnswer( in setUp()
|
/external/mockito/src/test/java/org/mockitousage/basicapi/ |
D | MocksSerializationForAnnotationTest.java | 46 when(barMock.doSomething()).thenAnswer(new ThrowsException(new RuntimeException())); in should_allow_throws_exception_to_be_serializable() 233 when(imethodsMock.objectArgMethod(anyString())).thenAnswer(answer); in should_serialize_with_stubbing_callback()
|
D | MocksSerializationTest.java | 51 when(barMock.doSomething()).thenAnswer(new ThrowsException(new RuntimeException())); in should_allow_method_delegation() 255 when(mock.objectArgMethod(anyString())).thenAnswer(answer); in should_serialize_with_stubbing_callback()
|
/external/mockito/src/test/java/org/mockitousage/spies/ |
D | SpyingOnInterfacesTest.java | 48 when(list.get(0)).thenAnswer( in shouldFailInRuntimeWhenCallingRealMethodOnInterface()
|
/external/opencensus-java/exporters/stats/signalfx/src/test/java/io/opencensus/exporter/stats/signalfx/ |
D | SignalFxStatsExporterWorkerThreadTest.java | 77 .thenAnswer( in setUp()
|
/external/javapoet/src/test/java/com/squareup/javapoet/ |
D | ClassNameTest.java | 136 when(spy.getEnclosingElement()).thenAnswer(invocation -> { in preventGetKind()
|
/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/ |
D | SharedResourceHolderTest.java | 181 when(mockExecutor.schedule(any(Runnable.class), anyLong(), any(TimeUnit.class))).thenAnswer( in createScheduledExecutor()
|
/external/mockito/src/main/java/org/mockito/ |
D | BDDMockito.java | 156 return new BDDOngoingStubbingImpl<T>(mockitoOngoingStubbing.thenAnswer(answer)); in willAnswer()
|