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