Class MockitoNewInvocationControl<T>

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.mockito.stubbing.OngoingStubbing<T> expectSubstitutionLogic​(java.lang.Object... arguments)
      Expect a call to the new instance substitution logic.
      InvocationSubstitute<T> getSubstitute()  
      java.lang.Object invoke​(java.lang.Class<?> type, java.lang.Object[] args, java.lang.Class<?>[] sig)
      Invoke the constructor invocation control
      java.lang.Object replay​(java.lang.Object... mocks)
      Replay the given objects or classes.
      java.lang.Object reset​(java.lang.Object... mocks)
      Reset the given objects or classes.
      void verify​(org.mockito.verification.VerificationMode verificationMode)  
      void verifyNoMoreInteractions()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MockitoNewInvocationControl

        public MockitoNewInvocationControl​(InvocationSubstitute<T> substitute)
    • Method Detail

      • invoke

        public java.lang.Object invoke​(java.lang.Class<?> type,
                                       java.lang.Object[] args,
                                       java.lang.Class<?>[] sig)
                                throws java.lang.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:
        java.lang.Exception
      • expectSubstitutionLogic

        public org.mockito.stubbing.OngoingStubbing<T> expectSubstitutionLogic​(java.lang.Object... arguments)
                                                                        throws java.lang.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:
        java.lang.Exception
      • replay

        public java.lang.Object replay​(java.lang.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 void verify​(org.mockito.verification.VerificationMode verificationMode)
      • reset

        public java.lang.Object reset​(java.lang.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).
      • verifyNoMoreInteractions

        public void verifyNoMoreInteractions()