Home
last modified time | relevance | path

Searched refs:thenAnswer (Results 1 – 19 of 19) sorted by relevance

/external/mockito/src/test/java/org/mockitousage/bugs/
DMockitoStubbedCallInAnswerTest.java28 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()
DShouldNotDeadlockAnswerExecutionTest.java30 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/
DStubbingWithCustomAnswerTest.java26 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()
DStubbingWithExtraAnswersTest.java30 … when(mock.objectReturningMethodNoArgs()).thenAnswer(AdditionalAnswers.returnsElementsOf(list)); in shouldWorkAsStandardMockito()
45 … when(mock.objectReturningMethodNoArgs()).thenAnswer(AdditionalAnswers.returnsElementsOf(list)); in shouldReturnNullIfNecessary()
DCloningParameterTest.java43 when(emailSender.getAllEmails(new Person("Wes"))).thenAnswer(new ClonesArguments()); in shouldReturnDefaultValueWithCloningAnswer()
/external/mockito/src/main/java/org/mockito/internal/stubbing/
DBaseStubbing.java20 return thenAnswer(new Returns(value)); in thenReturn()
38 return thenAnswer(new ThrowsException(throwable)); in thenThrow()
80 return thenAnswer(new CallsRealMethods()); in thenCallRealMethod()
DConsecutiveStubbing.java17 public OngoingStubbing<T> thenAnswer(Answer<?> answer) { in thenAnswer() method in ConsecutiveStubbing
23 return thenAnswer(answer); in then()
DOngoingStubbingImpl.java26 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/
DRequestQueueIntegrationTest.java86 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/
DFakeContextBuilder.java96 .thenAnswer( in build()
105 .thenAnswer( in build()
/external/mockito/src/main/java/org/mockito/stubbing/
DOngoingStubbing.java196 OngoingStubbing<T> thenAnswer(Answer<?> answer); in thenAnswer() method
/external/grpc-grpc-java/netty/src/test/java/io/grpc/netty/
DWriteQueueTest.java84 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/
DMocksSerializationForAnnotationTest.java46 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()
DMocksSerializationTest.java51 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/
DSpyingOnInterfacesTest.java48 when(list.get(0)).thenAnswer( in shouldFailInRuntimeWhenCallingRealMethodOnInterface()
/external/opencensus-java/exporters/stats/signalfx/src/test/java/io/opencensus/exporter/stats/signalfx/
DSignalFxStatsExporterWorkerThreadTest.java77 .thenAnswer( in setUp()
/external/javapoet/src/test/java/com/squareup/javapoet/
DClassNameTest.java136 when(spy.getEnclosingElement()).thenAnswer(invocation -> { in preventGetKind()
/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/
DSharedResourceHolderTest.java181 when(mockExecutor.schedule(any(Runnable.class), anyLong(), any(TimeUnit.class))).thenAnswer( in createScheduledExecutor()
/external/mockito/src/main/java/org/mockito/
DBDDMockito.java156 return new BDDOngoingStubbingImpl<T>(mockitoOngoingStubbing.thenAnswer(answer)); in willAnswer()