- class aws_cdk.integ_tests_alpha.EqualsAssertion(scope, id, *, actual, expected, fail_deployment=None)
(experimental) Construct that creates a CustomResource to assert that two values are equal.
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.integ_tests_alpha as integ_tests_alpha # actual_result: integ_tests_alpha.ActualResult # expected_result: integ_tests_alpha.ExpectedResult equals_assertion = integ_tests_alpha.EqualsAssertion(self, "MyEqualsAssertion", actual=actual_result, expected=expected_result, # the properties below are optional fail_deployment=False )
ActualResult) – (experimental) The actual results to compare.
ExpectedResult) – (experimental) The expected result to assert.
bool]) – (experimental) 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. Default: false
Returns a string representation of this construct.
- Return type:
The tree node.
(experimental) The result of the assertion.
- classmethod is_construct(x)
xis a construct.
Use this method instead of
instanceofto properly detect
Constructinstances, even when the construct library is symlinked.
constructslibrary on disk are seen as independent, completely different libraries. As a consequence, the class
Constructin each copy of the
constructslibrary is seen as a different class, and an instance of one class will not test as
instanceofthe other class.
npm installwill not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the
constructslibrary can be accidentally installed, and
instanceofwill behave unpredictably. It is safest to avoid using
instanceof, and using this type-testing method instead.
Any) – Any object.
- Return type:
xis an object created from a class which extends