Class ThrowingFunctionExecutionExample.Builder
- java.lang.Object
-
- io.contract_testing.contractcase.definitions.interactions.functions.ThrowingFunctionExecutionExample.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ThrowingFunctionExecutionExample>
- Enclosing interface:
- ThrowingFunctionExecutionExample
@Stability(Stable) public static final class ThrowingFunctionExecutionExample.Builder extends Object implements software.amazon.jsii.Builder<ThrowingFunctionExecutionExample>
A builder forThrowingFunctionExecutionExample
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ThrowingFunctionExecutionExample.Builderarguments(List<? extends Object> arguments)Sets the value ofThrowingFunctionExecutionExample.getArguments()ThrowingFunctionExecutionExamplebuild()Builds the configured instance.ThrowingFunctionExecutionExample.BuildererrorClassName(Object errorClassName)Sets the value ofThrowingFunctionExecutionExample.getErrorClassName()ThrowingFunctionExecutionExample.BuilderfunctionName(String functionName)Sets the value ofThrowingFunctionExecutionExample.getFunctionName()ThrowingFunctionExecutionExample.Buildermessage(Object message)Sets the value ofThrowingFunctionExecutionExample.getMessage()
-
-
-
Method Detail
-
arguments
@Stability(Stable) public ThrowingFunctionExecutionExample.Builder arguments(List<? extends Object> arguments)
Sets the value ofThrowingFunctionExecutionExample.getArguments()- 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 ThrowingFunctionExecutionExample.Builder errorClassName(Object errorClassName)
Sets the value ofThrowingFunctionExecutionExample.getErrorClassName()- Parameters:
errorClassName- A test equivalence matcher for the class name of this exception. This parameter is required.- Returns:
this
-
functionName
@Stability(Stable) public ThrowingFunctionExecutionExample.Builder functionName(String functionName)
Sets the value ofThrowingFunctionExecutionExample.getFunctionName()- Parameters:
functionName- The name of the function to be executed. This parameter is required. Doubles as the handle used by registerFunction.- Returns:
this
-
message
@Stability(Stable) public ThrowingFunctionExecutionExample.Builder message(Object message)
Sets the value ofThrowingFunctionExecutionExample.getMessage()- Parameters:
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- Returns:
this
-
build
@Stability(Stable) public ThrowingFunctionExecutionExample build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ThrowingFunctionExecutionExample>- Returns:
- a new instance of
ThrowingFunctionExecutionExample - Throws:
NullPointerException- if any required attribute was not provided
-
-