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 Details

    • substitute

      private final InvocationSubstitute<T> substitute
    • subsitutionType

      private final Class<T> subsitutionType
    • hasReplayed

      private boolean hasReplayed
    • hasVerified

      private boolean hasVerified
  • Constructor Details

  • Method Details

    • invoke

      public Object invoke(Class<?> type, Object[] args, Class<?>[] sig) throws Exception
      Description copied from interface: NewInvocationControl
      Invoke the constructor invocation control
      Specified by:
      invoke in interface NewInvocationControl<T>
      Parameters:
      type - invocation target type
      args - arguments of constructor invocation
      sig - 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: NewInvocationControl
      Expect a call to the new instance substitution logic.
      Specified by:
      expectSubstitutionLogic in interface NewInvocationControl<T>
      Parameters:
      arguments - constructor arguments
      Returns:
      result of stubbing a constructor. Result depends on mocking framework.
      Throws:
      Exception
    • replay

      public Object replay(Object... mocks)
      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 interface DefaultBehavior
      Parameters:
      mocks - The object(s) to replay. May be null.
      Returns:
      the result of the replay (may be null).
    • verify

      public Object verify(Object... mocks)
    • reset

      public Object reset(Object... mocks)
      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 interface DefaultBehavior
      Parameters:
      mocks - The object(s) to replay. May be null.
      Returns:
      the result of the replay (may be null).