Class EasyMockNewInvocationControl<T>
java.lang.Object
org.powermock.api.easymock.internal.invocationcontrol.EasyMockNewInvocationControl<T>
- All Implemented Interfaces:
DefaultBehavior, NewInvocationControl<org.easymock.IExpectationSetters<T>>
public class EasyMockNewInvocationControl<T>
extends Object
implements NewInvocationControl<org.easymock.IExpectationSetters<T>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate booleanprivate final InvocationSubstitute<T> -
Constructor Summary
ConstructorsConstructorDescriptionEasyMockNewInvocationControl(InvocationSubstitute<T> substitute, Class<T> type) -
Method Summary
Modifier and TypeMethodDescriptionorg.easymock.IExpectationSetters<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.
-
Field Details
-
substitute
-
subsitutionType
-
hasReplayed
private boolean hasReplayed -
hasVerified
private boolean hasVerified
-
-
Constructor Details
-
EasyMockNewInvocationControl
-
-
Method Details
-
invoke
Description copied from interface:NewInvocationControlInvoke the constructor invocation control- Specified by:
invokein interfaceNewInvocationControl<T>- Parameters:
type- invocation target typeargs- arguments of constructor invocationsig- parameters of a constructor- Returns:
- result of invocation
- Throws:
Exception
-
expectSubstitutionLogic
public org.easymock.IExpectationSetters<T> expectSubstitutionLogic(Object... arguments) throws Exception Description copied from interface:NewInvocationControlExpect a call to the new instance substitution logic.- Specified by:
expectSubstitutionLogicin interfaceNewInvocationControl<T>- Parameters:
arguments- constructor arguments- Returns:
- result of stubbing a constructor. Result depends on mocking framework.
- Throws:
Exception
-
replay
Description copied from interface:DefaultBehaviorReplay the given objects or classes. May throw exception if replay is not needed or not supported.- Specified by:
replayin interfaceDefaultBehavior- Parameters:
mocks- The object(s) to replay. May benull.- Returns:
- the result of the replay (may be
null).
-
verify
-
reset
Description copied from interface:DefaultBehaviorReset the given objects or classes. May throw exception if reset is not needed or not supported.- Specified by:
resetin interfaceDefaultBehavior- Parameters:
mocks- The object(s) to replay. May benull.- Returns:
- the result of the replay (may be
null).
-