Interface IMockInvocation

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Object callRealMethod()
      Delegates this method invocation to the real object underlying this mock object, including any method arguments.
      java.lang.Object callRealMethodWithArgs​(java.lang.Object... arguments)
      Delegates this method invocation to the real object underlying this mock object, replacing the original method arguments with the specified arguments.
      java.util.List<java.lang.Object> getArguments()
      The arguments for the invocation.
      IMockMethod getMethod()
      The invoked method.
      IMockObject getMockObject()
      The mock object that received the invocation.
    • Method Detail

      • getMockObject

        IMockObject getMockObject()
        The mock object that received the invocation.
      • getMethod

        IMockMethod getMethod()
        The invoked method.
      • getArguments

        java.util.List<java.lang.Object> getArguments()
        The arguments for the invocation.
      • callRealMethod

        java.lang.Object callRealMethod()
        Delegates this method invocation to the real object underlying this mock object, including any method arguments. If this mock object has no underlying real object, a CannotInvokeRealMethodException is thrown.
        Returns:
        the return value of the method to which this invocation was delegated
      • callRealMethodWithArgs

        java.lang.Object callRealMethodWithArgs​(java.lang.Object... arguments)
        Delegates this method invocation to the real object underlying this mock object, replacing the original method arguments with the specified arguments. If this mock object has no underlying real object, a CannotInvokeRealMethodException is thrown.
        Returns:
        the return value of the method to which this invocation was delegated