Class MockitoNewInvocationControl<T>
- java.lang.Object
-
- org.powermock.api.mockito.internal.invocation.MockitoNewInvocationControl<T>
-
- All Implemented Interfaces:
DefaultBehavior,NewInvocationControl<org.mockito.stubbing.OngoingStubbing<T>>
public class MockitoNewInvocationControl<T> extends Object implements NewInvocationControl<org.mockito.stubbing.OngoingStubbing<T>>
-
-
Constructor Summary
Constructors Constructor Description MockitoNewInvocationControl(InvocationSubstitute<T> substitute)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.mockito.stubbing.OngoingStubbing<T>expectSubstitutionLogic(Object... arguments)Expect a call to the new instance substitution logic.InvocationSubstitute<T>getSubstitute()Objectinvoke(Class<?> type, Object[] args, Class<?>[] sig)Invoke the invocation controlObjectreplay(Object... mocks)Replay the given objects or classes.Objectreset(Object... mocks)Reset the given objects or classes.Objectverify(Object... mocks)Verify the given objects or classes.voidverifyNoMoreInteractions()
-
-
-
Constructor Detail
-
MockitoNewInvocationControl
public MockitoNewInvocationControl(InvocationSubstitute<T> substitute)
-
-
Method Detail
-
invoke
public Object invoke(Class<?> type, Object[] args, Class<?>[] sig) throws Exception
Description copied from interface:NewInvocationControlInvoke the invocation control- Specified by:
invokein interfaceNewInvocationControl<T>- Throws:
Exception
-
expectSubstitutionLogic
public org.mockito.stubbing.OngoingStubbing<T> expectSubstitutionLogic(Object... arguments) throws Exception
Description copied from interface:NewInvocationControlExpect a call to the new instance substitution logic.- Specified by:
expectSubstitutionLogicin interfaceNewInvocationControl<T>- Throws:
Exception
-
getSubstitute
public InvocationSubstitute<T> getSubstitute()
-
replay
public Object replay(Object... mocks)
Replay the given objects or classes. May throw exception if replay is not needed or not supported.- Specified by:
replayin interfaceDefaultBehavior- Returns:
- the result of the replay (may be
null).
-
verify
public Object verify(Object... mocks)
Verify the given objects or classes. May throw exception if verify is not needed or not supported.- Specified by:
verifyin interfaceDefaultBehavior- Returns:
- the result of the verification (may be
null).
-
reset
public Object reset(Object... mocks)
Reset the given objects or classes. May throw exception if reset is not needed or not supported.- Specified by:
resetin interfaceDefaultBehavior- Returns:
- the result of the replay (may be
null).
-
verifyNoMoreInteractions
public void verifyNoMoreInteractions()
-
-