Class WillCallThrowingFunction.Builder
- java.lang.Object
-
- io.contract_testing.contractcase.definitions.interactions.functions.WillCallThrowingFunction.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<WillCallThrowingFunction>
- Enclosing class:
- WillCallThrowingFunction
@Stability(Stable) public static final class WillCallThrowingFunction.Builder extends Object implements software.amazon.jsii.Builder<WillCallThrowingFunction>
A fluent builder forWillCallThrowingFunction.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description WillCallThrowingFunction.Builderarguments(List<? extends Object> arguments)An array of expected function arguments (or test equivalence matchers for those arguments).WillCallThrowingFunctionbuild()static WillCallThrowingFunction.Buildercreate()WillCallThrowingFunction.BuildererrorClassName(Object errorClassName)A test equivalence matcher for the class name of this exception.WillCallThrowingFunction.BuilderfunctionName(String functionName)The name of the function to be executed.WillCallThrowingFunction.Buildermessage(Object message)A test equivalence matcher for the message from this exception.
-
-
-
Method Detail
-
create
@Stability(Stable) public static WillCallThrowingFunction.Builder create()
- Returns:
- a new instance of
WillCallThrowingFunction.Builder.
-
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
-
build
@Stability(Stable) public WillCallThrowingFunction build()
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<WillCallThrowingFunction>- Returns:
- a newly built instance of
WillCallThrowingFunction.
-
-