Class Annotations
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.assertions.Annotations
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-22T02:23:55.903Z")
@Stability(Stable)
public class Annotations
extends software.amazon.jsii.JsiiObject
Suite of assertions that can be run on a CDK Stack.
Focused on asserting annotations.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.*; import software.amazon.awscdk.assertions.*; Stack stack; Annotations annotations = Annotations.fromStack(stack);
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
ModifierConstructorDescriptionprotected
Annotations
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
Annotations
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionGet the set of matching errors of a given construct path and message.Get the set of matching infos of a given construct path and message.findWarning
(String constructPath, Object message) Get the set of matching warning of a given construct path and message.static Annotations
Base your assertions on the messages returned by a synthesized CDKStack
.void
Assert that an error with the given message exists in the synthesized CDKStack
.void
Assert that an info with the given message exists in the synthesized CDKStack
.void
hasNoError
(String constructPath, Object message) Assert that an error with the given message does not exist in the synthesized CDKStack
.void
Assert that an info with the given message does not exist in the synthesized CDKStack
.void
hasNoWarning
(String constructPath, Object message) Assert that an warning with the given message does not exist in the synthesized CDKStack
.void
hasWarning
(String constructPath, Object message) Assert that an warning with the given message exists in the synthesized CDKStack
.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
Annotations
protected Annotations(software.amazon.jsii.JsiiObjectRef objRef) -
Annotations
protected Annotations(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
-
Method Details
-
fromStack
Base your assertions on the messages returned by a synthesized CDKStack
.- Parameters:
stack
- the CDK Stack to run assertions on. This parameter is required.
-
findError
@Stability(Stable) @NotNull public List<SynthesisMessage> findError(@NotNull String constructPath, @NotNull Object message) Get the set of matching errors of a given construct path and message.- Parameters:
constructPath
- the construct path to the error, provide'*'
to match all errors in the template. This parameter is required.message
- the error message as should be expected. This parameter is required.
-
findInfo
@Stability(Stable) @NotNull public List<SynthesisMessage> findInfo(@NotNull String constructPath, @NotNull Object message) Get the set of matching infos of a given construct path and message.- Parameters:
constructPath
- the construct path to the info, provide'*'
to match all infos in the template. This parameter is required.message
- the info message as should be expected. This parameter is required.
-
findWarning
@Stability(Stable) @NotNull public List<SynthesisMessage> findWarning(@NotNull String constructPath, @NotNull Object message) Get the set of matching warning of a given construct path and message.- Parameters:
constructPath
- the construct path to the warning, provide'*'
to match all warnings in the template. This parameter is required.message
- the warning message as should be expected. This parameter is required.
-
hasError
Assert that an error with the given message exists in the synthesized CDKStack
.- Parameters:
constructPath
- the construct path to the error, provide'*'
to match all errors in the template. This parameter is required.message
- the error message as should be expected. This parameter is required.
-
hasInfo
Assert that an info with the given message exists in the synthesized CDKStack
.- Parameters:
constructPath
- the construct path to the info, provide'*'
to match all info in the template. This parameter is required.message
- the info message as should be expected. This parameter is required.
-
hasNoError
Assert that an error with the given message does not exist in the synthesized CDKStack
.- Parameters:
constructPath
- the construct path to the error, provide'*'
to match all errors in the template. This parameter is required.message
- the error message as should be expected. This parameter is required.
-
hasNoInfo
Assert that an info with the given message does not exist in the synthesized CDKStack
.- Parameters:
constructPath
- the construct path to the info, provide'*'
to match all info in the template. This parameter is required.message
- the info message as should be expected. This parameter is required.
-
hasNoWarning
Assert that an warning with the given message does not exist in the synthesized CDKStack
.- Parameters:
constructPath
- the construct path to the warning, provide'*'
to match all warnings in the template. This parameter is required.message
- the warning message as should be expected. This parameter is required.
-
hasWarning
Assert that an warning with the given message exists in the synthesized CDKStack
.- Parameters:
constructPath
- the construct path to the warning, provide'*'
to match all warnings in the template. This parameter is required.message
- the warning message as should be expected. This parameter is required.
-