Interface InvocationFactory

    • Method Detail

      • createInvocation

        Invocation createInvocation​(Object target,
                                    MockCreationSettings settings,
                                    Method method,
                                    InvocationFactory.RealMethodBehavior realMethod,
                                    Object... args)
        Creates instance of an Invocation object. This method is useful for framework integrators to programmatically simulate method calls on mocks using MockHandler. It enables advanced framework integrations.
        Parameters:
        target - the mock object the method is invoked on.
        settings - creation settings of the mock object.
        method - java method invoked on mock.
        realMethod - real method behavior. Needed for spying / invoking real behavior on mock objects.
        args - the java method arguments
        Returns:
        invocation instance
        Since:
        2.14.0