AssertProps
Properties for defining a Assert
.
See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-ros-assert
Initializer
import { AssertProps } from '@alicloud/ros-cdk-ros'
const assertProps: AssertProps = { ... }
Properties
Name | Type | Description |
---|---|---|
values |
any[] | @alicloud/ros-cdk-core.IResolvable |
Property values: A list of values to assert. |
abortCreation |
boolean | @alicloud/ros-cdk-core.IResolvable |
Property abortCreation: Whether to abort creation when the assert fails. |
errorMessage |
string | @alicloud/ros-cdk-core.IResolvable |
Property errorMessage: The error message to be returned when the assert fails. |
operation |
string | @alicloud/ros-cdk-core.IResolvable |
Property operation: The type of assertion to make. |
values
Required
public readonly values: any[] | IResolvable;
- Type: any[] | @alicloud/ros-cdk-core.IResolvable
Property values: A list of values to assert.
The items in the list are compared in order. The range of length is one to three. - Three values are supported only if the operation is Equal or NotEqual. - One value is supported only if the operation is Not.
abortCreation
Optional
public readonly abortCreation: boolean | IResolvable;
- Type: boolean | @alicloud/ros-cdk-core.IResolvable
Property abortCreation: Whether to abort creation when the assert fails.
Default is True.
errorMessage
Optional
public readonly errorMessage: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property errorMessage: The error message to be returned when the assert fails.
operation
Optional
public readonly operation: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property operation: The type of assertion to make.
The supported operations are: Equal, NotEqual, Greater, GreaterOrEqual, Less, LessOrEqual, Contain, NotContain, And, Or, Not. Default is Equal.