Searched refs:thenAnswer (Results 1 – 13 of 13) sorted by relevance
16 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()
17 public OngoingStubbing<T> thenAnswer(Answer<?> answer) { in thenAnswer() method in ConsecutiveStubbing23 return thenAnswer(answer); in then()
23 public OngoingStubbing<T> thenAnswer(Answer<?> answer) { in thenAnswer() method in OngoingStubbingImpl33 return thenAnswer(answer); in then()
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()
30 … when(mock.objectReturningMethodNoArgs()).thenAnswer(AdditionalAnswers.returnsElementsOf(list)); in shouldWorkAsStandardMockito()45 … when(mock.objectReturningMethodNoArgs()).thenAnswer(AdditionalAnswers.returnsElementsOf(list)); in shouldReturnNullIfNecessary()
43 when(emailSender.getAllEmails(new Person("Wes"))).thenAnswer(new ClonesArguments()); in shouldReturnDefaultValueWithCloningAnswer()
29 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()
81 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()
196 OngoingStubbing<T> thenAnswer(Answer<?> answer); in thenAnswer() method
47 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()
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()
49 when(list.get(0)).thenAnswer( in shouldFailInRuntimeWhenCallingRealMethodOnInterface()
156 return new BDDOngoingStubbingImpl<T>(mockitoOngoingStubbing.thenAnswer(answer)); in willAnswer()