class EqualsAssertion (construct)
Language | Type name |
---|---|
.NET | Amazon.CDK.IntegTests.EqualsAssertion |
Java | software.amazon.awscdk.integtests.EqualsAssertion |
Python | aws_cdk.integ_tests.EqualsAssertion |
TypeScript (source) | @aws-cdk/integ-tests » EqualsAssertion |
Implements
IConstruct
, 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 from '@aws-cdk/integ-tests';
declare const actualResult: integ_tests.ActualResult;
declare const expectedResult: integ_tests.ExpectedResult;
const equalsAssertion = new integ_tests.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 | Construct | The construct tree node associated with this construct. |
result | string | The result of the assertion. |
node
Type:
Construct
The construct tree node associated with this construct.
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.