Skip to content

AssertProps

Properties for defining a Assert.

See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-ros-assert

Initializer

import ros_cdk_ros
ros_cdk_ros.AssertProps(
  values: typing.Union[typing.List[typing.Any], IResolvable],
  abort_creation: typing.Union[bool, IResolvable] = None,
  error_message: typing.Union[str, IResolvable] = None,
  operation: typing.Union[str, IResolvable] = None
)

Properties

Name Type Description
values typing.Union[typing.List[typing.Any], ros_cdk_core.IResolvable] Property values: A list of values to assert.
abort_creation typing.Union[bool, ros_cdk_core.IResolvable] Property abortCreation: Whether to abort creation when the assert fails.
error_message typing.Union[str, ros_cdk_core.IResolvable] Property errorMessage: The error message to be returned when the assert fails.
operation typing.Union[str, ros_cdk_core.IResolvable] Property operation: The type of assertion to make.

valuesRequired

values: typing.Union[typing.List[typing.Any], IResolvable]
  • Type: typing.Union[typing.List[typing.Any], 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.

abort_creationOptional

abort_creation: typing.Union[bool, IResolvable]
  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property abortCreation: Whether to abort creation when the assert fails.

Default is True.


error_messageOptional

error_message: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property errorMessage: The error message to be returned when the assert fails.


operationOptional

operation: typing.Union[str, IResolvable]
  • Type: typing.Union[str, 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.