|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mockito.internal.stubbing.BaseStubbing<T>
org.mockito.internal.stubbing.OngoingStubbingImpl<T>
public class OngoingStubbingImpl<T>
Constructor Summary | |
---|---|
OngoingStubbingImpl(InvocationContainerImpl invocationContainerImpl)
|
Method Summary | |
---|---|
java.util.List<Invocation> |
getRegisteredInvocations()
|
OngoingStubbing<T> |
thenAnswer(Answer<?> answer)
Sets a generic Answer for the method. |
DeprecatedOngoingStubbing<T> |
toAnswer(Answer<?> answer)
Set a generic Answer for the stubbed method. |
Methods inherited from class org.mockito.internal.stubbing.BaseStubbing |
---|
thenCallRealMethod, thenReturn, thenReturn, thenThrow, toReturn, toThrow |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OngoingStubbingImpl(InvocationContainerImpl invocationContainerImpl)
Method Detail |
---|
public OngoingStubbing<T> thenAnswer(Answer<?> answer)
OngoingStubbing
when(mock.someMethod(10)).thenAnswer(new Answer<Integer>() { public Integer answer(InvocationOnMock invocation) throws Throwable { return (Integer) invocation.getArguments()[0]; } }
answer
- the custom answer to execute.
public DeprecatedOngoingStubbing<T> toAnswer(Answer<?> answer)
DeprecatedOngoingStubbing
stub(mock.someMethod(10)).toAnswer(new Answer<Integer>() { public Integer answer(InvocationOnMock invocation) throws Throwable { return (Integer) invocation.getArguments()[0]; } }
answer
- the custom answer to execute.
public java.util.List<Invocation> getRegisteredInvocations()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |