Class WillCallThrowingFunction.Builder

    • Method Detail

      • arguments

        @Stability(Stable)
        public WillCallThrowingFunction.Builder arguments​(List<? extends Object> arguments)
        An array of expected function arguments (or test equivalence matchers for those arguments).

        Parameters:
        arguments - An array of expected function arguments (or test equivalence matchers for those arguments). This parameter is required.
        Returns:
        this
      • errorClassName

        @Stability(Stable)
        public WillCallThrowingFunction.Builder errorClassName​(Object errorClassName)
        A test equivalence matcher for the class name of this exception.

        Parameters:
        errorClassName - A test equivalence matcher for the class name of this exception. This parameter is required.
        Returns:
        this
      • functionName

        @Stability(Stable)
        public WillCallThrowingFunction.Builder functionName​(String functionName)
        The name of the function to be executed.

        Doubles as the handle used by registerFunction.

        Parameters:
        functionName - The name of the function to be executed. This parameter is required.
        Returns:
        this
      • message

        @Stability(Stable)
        public WillCallThrowingFunction.Builder message​(Object message)
        A test equivalence matcher for the message from this exception.

        In general, it's best to rely on the class of the exception instead of the specific error message

        Parameters:
        message - A test equivalence matcher for the message from this exception. This parameter is required.
        Returns:
        this