Home
last modified time | relevance | path

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

/external/mockito/src/main/java/org/mockito/internal/stubbing/
DBaseStubbing.java16 return thenAnswer(new Returns(value)); in thenReturn()
33 return thenAnswer(new ThrowsException(throwable)); in thenThrow()
52 return thenAnswer(new ThrowsExceptionClass(throwableType)); in thenThrow()
68 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.java23 public OngoingStubbing<T> thenAnswer(Answer<?> answer) { in thenAnswer() method in OngoingStubbingImpl
33 return thenAnswer(answer); in then()
/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/test/java/org/mockitousage/bugs/
DShouldNotDeadlockAnswerExecutionTest.java29 Mockito.when(service.verySlowMethod()).thenAnswer(new LockingAnswer(counter)); in failIfMockIsSharedBetweenThreads()
55 Mockito.when(service1.verySlowMethod()).thenAnswer(new LockingAnswer(counter)); in successIfEveryThreadHasItsOwnMock()
56 Mockito.when(service2.verySlowMethod()).thenAnswer(new LockingAnswer(counter)); in successIfEveryThreadHasItsOwnMock()
/external/volley/src/test/java/com/android/volley/
DRequestQueueIntegrationTest.java81 when(mMockNetwork.performRequest(higherPriorityReq)).thenAnswer(delayAnswer); in add_requestProcessedInCorrectOrder()
119 when(mMockNetwork.performRequest(req1)).thenAnswer(delayAnswer); in add_dedupeByCacheKey()
153 when(mMockNetwork.performRequest(request)).thenAnswer(delayAnswer); in add_requestFinishedListenerCanceled()
/external/mockito/src/main/java/org/mockito/stubbing/
DOngoingStubbing.java196 OngoingStubbing<T> thenAnswer(Answer<?> answer); in thenAnswer() method
/external/mockito/src/test/java/org/mockitousage/basicapi/
DMocksSerializationForAnnotationTest.java47 when(barMock.doSomething()).thenAnswer(new ThrowsException(new RuntimeException())); in should_allow_throws_exception_to_be_serializable()
234 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.java49 when(list.get(0)).thenAnswer( in shouldFailInRuntimeWhenCallingRealMethodOnInterface()
/external/mockito/src/main/java/org/mockito/
DBDDMockito.java156 return new BDDOngoingStubbingImpl<T>(mockitoOngoingStubbing.thenAnswer(answer)); in willAnswer()