Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV NEXT | FRAMES NO FRAMES

## Uses of Interface
org.mockito.stubbing.Answer

Packages that use Answer
org.mockito | Mockito is a mock library for java - see Mockito class for for usage.
org.mockito.configuration | Mockito configuration utilities
org.mockito.internal | Internal classes, not to be used by clients.
org.mockito.internal.configuration | Mockito configuration
org.mockito.internal.creation | Mock object creation.
org.mockito.internal.creation.settings |
org.mockito.internal.stubbing | Stubbing logic.
org.mockito.internal.stubbing.answers | Answers for stubbed calls
org.mockito.internal.stubbing.defaultanswers | Implementations of ReturnValues
org.mockito.mock |
org.mockito.stubbing | External stubbing related classes

Uses of Answer in org.mockito

Fields in org.mockito declared as Answer
`static Answer<java.lang.Object>` | `Mockito.CALLS_REAL_METHODS` Optional `Answer` to be used with `Mockito.mock(Class, Answer)`
`static Answer<java.lang.Object>` | `Mockito.RETURNS_DEEP_STUBS` Optional `Answer` to be used with `Mockito.mock(Class, Answer)`.
`static Answer<java.lang.Object>` | `Mockito.RETURNS_DEFAULTS` The default `Answer` of every mock if the mock was not stubbed.
`static Answer<java.lang.Object>` | `Mockito.RETURNS_MOCKS` Optional `Answer` to be used with `Mockito.mock(Class, Answer)`
`static Answer<java.lang.Object>` | `Mockito.RETURNS_SMART_NULLS` Optional `Answer` to be used with `Mockito.mock(Class, Answer)`.

Methods in org.mockito that return Answer
`static
`<T> Answer<T>`
` | `AdditionalAnswers.delegatesTo(java.lang.Object delegate)` An answer that directly forwards the calls to the delegate.
`Answer<java.lang.Object>` | `Answers.get()`
`static
`<T> Answer<T>`
` | `AdditionalAnswers.returnsArgAt(int position)` Returns the parameter of an invocation at the given position.
`static
`<T> Answer<T>`
` | `AdditionalAnswers.returnsElementsOf(java.util.Collection<?> elements)` Returns elements of the collection.
`static
`<T> Answer<T>`
` | `AdditionalAnswers.returnsFirstArg()` Returns the first parameter of an invocation.
`static
`<T> Answer<T>`
` | `AdditionalAnswers.returnsLastArg()` Returns the last parameter of an invocation.
`static
`<T> Answer<T>`
` | `AdditionalAnswers.returnsSecondArg()` Returns the second parameter of an invocation.

Methods in org.mockito with parameters of type Answer
`MockSettings` | `MockSettings.defaultAnswer(Answer defaultAnswer)` Specifies default answers to interactions.
`static Stubber` | `Mockito.doAnswer(Answer answer)` Use `doAnswer()` when you want to stub a void method with generic `Answer`.
`static
`<T> T`
` | `Mockito.mock(java.lang.Class<T> classToMock, Answer defaultAnswer)` Creates mock with a specified strategy for its answers to interactions.
`BDDMockito.BDDMyOngoingStubbing<T>` | `BDDMockito.BDDMyOngoingStubbing.will(Answer<?> answer)` See original `OngoingStubbing.then(Answer)`
`BDDMockito.BDDMyOngoingStubbing<T>` | `BDDMockito.BDDOngoingStubbingImpl.will(Answer<?> answer)`
`static BDDMockito.BDDStubber` | `BDDMockito.willAnswer(Answer answer)` see original `Mockito.doAnswer(Answer)`
`BDDMockito.BDDStubber` | `BDDMockito.BDDStubber.willAnswer(Answer answer)` See original `Stubber.doAnswer(Answer)`
`BDDMockito.BDDStubber` | `BDDMockito.BDDStubberImpl.willAnswer(Answer answer)`
`BDDMockito.BDDMyOngoingStubbing<T>` | `BDDMockito.BDDMyOngoingStubbing.willAnswer(Answer<?> answer)` See original `OngoingStubbing.thenAnswer(Answer)`
`BDDMockito.BDDMyOngoingStubbing<T>` | `BDDMockito.BDDOngoingStubbingImpl.willAnswer(Answer<?> answer)`

Uses of Answer in org.mockito.configuration

Methods in org.mockito.configuration that return Answer
`Answer<java.lang.Object>` | `IMockitoConfiguration.getDefaultAnswer()` Allows configuring the default answers of unstubbed invocations
`Answer<java.lang.Object>` | `DefaultMockitoConfiguration.getDefaultAnswer()`

Uses of Answer in org.mockito.internal

Methods in org.mockito.internal with parameters of type Answer
`Stubber` | `MockitoCore.doAnswer(Answer answer)`

Method parameters in org.mockito.internal with type arguments of type Answer
`void` | `InternalMockHandler.setAnswersForStubbing(java.util.List<Answer> answers)`

Uses of Answer in org.mockito.internal.configuration

Methods in org.mockito.internal.configuration that return Answer
`Answer<java.lang.Object>` | `GlobalConfiguration.getDefaultAnswer()`

Uses of Answer in org.mockito.internal.creation

Methods in org.mockito.internal.creation that return Answer
`Answer<java.lang.Object>` | `MockSettingsImpl.getDefaultAnswer()`

Methods in org.mockito.internal.creation with parameters of type Answer
`MockSettings` | `MockSettingsImpl.defaultAnswer(Answer defaultAnswer)`

Uses of Answer in org.mockito.internal.creation.settings

Fields in org.mockito.internal.creation.settings declared as Answer
`protected Answer<java.lang.Object>` | `CreationSettings.defaultAnswer`

Methods in org.mockito.internal.creation.settings that return Answer
`Answer<java.lang.Object>` | `CreationSettings.getDefaultAnswer()`

Uses of Answer in org.mockito.internal.stubbing

Classes in org.mockito.internal.stubbing that implement Answer
`class` | `StubbedInvocationMatcher`

Methods in org.mockito.internal.stubbing with parameters of type Answer
`void` | `StubbedInvocationMatcher.addAnswer(Answer answer)`
`void` | `InvocationContainerImpl.addAnswer(Answer answer)`
`void` | `InvocationContainerImpl.addAnswer(Answer answer, boolean isConsecutive)`
`void` | `InvocationContainerImpl.addAnswerForVoidMethod(Answer answer)`
`void` | `InvocationContainerImpl.addConsecutiveAnswer(Answer answer)`
`Stubber` | `StubberImpl.doAnswer(Answer answer)`
`OngoingStubbing<T>` | `OngoingStubbingImpl.then(Answer<?> answer)`
`OngoingStubbing<T>` | `ConsecutiveStubbing.then(Answer<?> answer)`
`OngoingStubbing<T>` | `OngoingStubbingImpl.thenAnswer(Answer<?> answer)`
`OngoingStubbing<T>` | `ConsecutiveStubbing.thenAnswer(Answer<?> answer)`
`VoidMethodStubbable<T>` | `VoidMethodStubbableImpl.toAnswer(Answer<?> answer)`
`DeprecatedOngoingStubbing<T>` | `OngoingStubbingImpl.toAnswer(Answer<?> answer)`
`DeprecatedOngoingStubbing<T>` | `ConsecutiveStubbing.toAnswer(Answer<?> answer)`

Method parameters in org.mockito.internal.stubbing with type arguments of type Answer
`void` | `InvocationContainerImpl.setAnswersForStubbing(java.util.List<Answer> answers)`

Constructors in org.mockito.internal.stubbing with parameters of type Answer
`StubbedInvocationMatcher(InvocationMatcher invocation, Answer answer)`

Uses of Answer in org.mockito.internal.stubbing.answers

Classes in org.mockito.internal.stubbing.answers that implement Answer
`class` | `AnswerReturnValuesAdapter`
`class` | `CallsRealMethods` Optional Answer that adds partial mocking support
`class` | `ClonesArguments`
`class` | `DoesNothing`
`class` | `Returns`
`class` | `ReturnsArgumentAt` Returns the passed parameter identity at specified index.
`class` | `ReturnsElementsOf` Returns elements of the collection.
`class` | `ThrowsException`
`class` | `ThrowsExceptionClass`

Methods in org.mockito.internal.stubbing.answers with parameters of type Answer
`void` | `AnswersValidator.validate(Answer<?> answer, Invocation invocation)`

Uses of Answer in org.mockito.internal.stubbing.defaultanswers

Classes in org.mockito.internal.stubbing.defaultanswers that implement Answer
`class` | `ForwardsInvocations` Internal answer to forward invocations on a real instance.
`class` | `GloballyConfiguredAnswer` Globally configured Answer.
`class` | `ReturnsDeepStubs` Returning deep stub implementation.
`class` | `ReturnsEmptyValues` Default answer of every Mockito mock.
`class` | `ReturnsMocks`
`class` | `ReturnsMoreEmptyValues` It's likely this implementation will be used by default by every Mockito 2.0 mock.
`class` | `ReturnsSmartNulls` Optional Answer that can be used with `Mockito.mock(Class, Answer)`

Methods in org.mockito.internal.stubbing.defaultanswers that return Answer
`Answer<java.lang.Object>` | `Answers.get()` Deprecated.

Uses of Answer in org.mockito.mock

Methods in org.mockito.mock that return Answer
`Answer` | `MockCreationSettings.getDefaultAnswer()` the default answer for this mock, see `MockSettings.defaultAnswer(org.mockito.stubbing.Answer)`.

Uses of Answer in org.mockito.stubbing

Methods in org.mockito.stubbing with parameters of type Answer
`Stubber` | `Stubber.doAnswer(Answer answer)` Use it for stubbing consecutive calls in `Mockito.doAnswer(Answer)` style:
       doAnswer(answerOne).
`OngoingStubbing<T>` | `OngoingStubbing.then(Answer<?> answer)` Sets a generic Answer for the method.
`OngoingStubbing<T>` | `OngoingStubbing.thenAnswer(Answer<?> answer)` Sets a generic Answer for the method.
`VoidMethodStubbable<T>` | `VoidMethodStubbable.toAnswer(Answer<?> answer)` Stubs a void method with generic `Answer`
`DeprecatedOngoingStubbing<T>` | `DeprecatedOngoingStubbing.toAnswer(Answer<?> answer)` Set a generic Answer for the stubbed method.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV NEXT | FRAMES NO FRAMES