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>>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.mockito.stubbing.OngoingStubbing
<T> expectSubstitutionLogic
(Object... arguments) Expect a call to the new instance substitution logic.Invoke the constructor invocation controlReplay the given objects or classes.Reset the given objects or classes.void
verify
(org.mockito.verification.VerificationMode verificationMode) void
-
Field Details
-
substitute
-
-
Constructor Details
-
MockitoNewInvocationControl
-
-
Method Details
-
invoke
Description copied from interface:NewInvocationControl
Invoke the constructor invocation control- Specified by:
invoke
in interfaceNewInvocationControl<T>
- Parameters:
type
- invocation target typeargs
- arguments of constructor invocationsig
- parameters of a constructor- Returns:
- result of invocation
- Throws:
Exception
-
expectSubstitutionLogic
public org.mockito.stubbing.OngoingStubbing<T> expectSubstitutionLogic(Object... arguments) throws Exception Description copied from interface:NewInvocationControl
Expect a call to the new instance substitution logic.- Specified by:
expectSubstitutionLogic
in interfaceNewInvocationControl<T>
- Parameters:
arguments
- constructor arguments- Returns:
- result of stubbing a constructor. Result depends on mocking framework.
- Throws:
Exception
-
getSubstitute
-
replay
Description copied from interface:DefaultBehavior
Replay the given objects or classes. May throw exception if replay is not needed or not supported.- Specified by:
replay
in interfaceDefaultBehavior
- Parameters:
mocks
- The object(s) to replay. May benull
.- Returns:
- the result of the replay (may be
null
).
-
verify
public void verify(org.mockito.verification.VerificationMode verificationMode) -
reset
Description copied from interface:DefaultBehavior
Reset the given objects or classes. May throw exception if reset is not needed or not supported.- Specified by:
reset
in interfaceDefaultBehavior
- Parameters:
mocks
- The object(s) to replay. May benull
.- Returns:
- the result of the replay (may be
null
).
-
verifyNoMoreInteractions
public void verifyNoMoreInteractions()
-