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
EqualsAssertion 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. |
| with(...mixins) | Applies one or more mixins to this construct. |
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.
with(...mixins)
public with(...mixins: IMixin[]): IConstruct
Parameters
- mixins
IMixinโ The mixins to apply.
Returns
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple with() calls if subsequent mixins should apply to added
constructs.

.NET
Go
Java
Python
TypeScript (