class EqualsAssertion (construct)
Language | Type name |
---|---|
.NET | Amazon.CDK.IntegTests.Alpha.EqualsAssertion |
Go | github.com/aws/aws-cdk-go/awscdkintegtestsalpha/v2#EqualsAssertion |
Java | software.amazon.awscdk.integtests.alpha.EqualsAssertion |
Python | aws_cdk.integ_tests_alpha.EqualsAssertion |
TypeScript (source) | @aws-cdk/integ-tests-alpha ยป EqualsAssertion |
Implements
IConstruct
, IDependable
Construct that creates a CustomResource to assert that two values are equal.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as integ_tests_alpha from '@aws-cdk/integ-tests-alpha';
declare const actualResult: integ_tests_alpha.ActualResult;
declare const expectedResult: integ_tests_alpha.ExpectedResult;
const equalsAssertion = new integ_tests_alpha.EqualsAssertion(this, 'MyEqualsAssertion', {
actual: actualResult,
expected: expectedResult,
// the properties below are optional
failDeployment: false,
});
Initializer
new EqualsAssertion(scope: Construct, id: string, props: EqualsAssertionProps)
Parameters
- scope
Construct
- id
string
- props
Equals
Assertion Props
Construct Props
Name | Type | Description |
---|---|---|
actual | Actual | The actual results to compare. |
expected | Expected | The expected result to assert. |
fail | boolean | Set this to true if a failed assertion should result in a CloudFormation deployment failure. |
actual
Type:
Actual
The actual results to compare.
expected
Type:
Expected
The expected result to assert.
failDeployment?
Type:
boolean
(optional, default: false)
Set this to true if a failed assertion should result in a CloudFormation deployment failure.
This is only necessary if assertions are being
executed outside of integ-runner
.
Properties
Name | Type | Description |
---|---|---|
node | Node | The tree node. |
result | string | The result of the assertion. |
node
Type:
Node
The tree node.
result
Type:
string
The result of the assertion.
Methods
Name | Description |
---|---|
to | Returns a string representation of this construct. |
String()
topublic toString(): string
Returns
string
Returns a string representation of this construct.