Skip to content

AssertProps

Properties for defining a Assert.

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

Initializer

import com.aliyun.ros.cdk.ros.AssertProps;
AssertProps.builder()
    .values(java.util.List<java.lang.Object>)
    .values(IResolvable)
//  .abortCreation(java.lang.Boolean)
//  .abortCreation(IResolvable)
//  .errorMessage(java.lang.String)
//  .errorMessage(IResolvable)
//  .operation(java.lang.String)
//  .operation(IResolvable)
    .build();

Properties

Name Type Description
values java.util.List OR com.aliyun.ros.cdk.core.IResolvable Property values: A list of values to assert.
abortCreation java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property abortCreation: Whether to abort creation when the assert fails.
errorMessage java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property errorMessage: The error message to be returned when the assert fails.
operation java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property operation: The type of assertion to make.

valuesRequired

public java.lang.Object getValues();
  • Type: java.util.List OR com.aliyun.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.

abortCreationOptional

public java.lang.Object getAbortCreation();
  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

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

Default is True.


errorMessageOptional

public java.lang.Object getErrorMessage();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

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


operationOptional

public java.lang.Object getOperation();
  • Type: java.lang.String OR com.aliyun.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.