Interface NewInvocationControl<T>

All Superinterfaces:
DefaultBehavior
All Known Implementing Classes:
EasyMockNewInvocationControl, MockitoNewInvocationControl

public interface NewInvocationControl<T> extends DefaultBehavior
A new invocation control pairs up a InvocationSubstitute with the mock object created when invoking InvocationSubstitute.performSubstitutionLogic(Object...) object.
  • Method Details

    • invoke

      Object invoke(Class<?> type, Object[] args, Class<?>[] sig) throws Exception
      Invoke the constructor invocation control
      Parameters:
      type - invocation target type
      args - arguments of constructor invocation
      sig - parameters of a constructor
      Returns:
      result of invocation
      Throws:
      Exception
    • expectSubstitutionLogic

      T expectSubstitutionLogic(Object... arguments) throws Exception
      Expect a call to the new instance substitution logic.
      Parameters:
      arguments - constructor arguments
      Returns:
      result of stubbing a constructor. Result depends on mocking framework.
      Throws:
      Exception