Class Match
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.assertions.Match
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-10-25T14:21:09.034Z")
@Stability(Stable)
public abstract class Match
extends software.amazon.jsii.JsiiObject
Partial and special matching during template assertions.
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Matcher
absent()
Use this matcher in the place of a field's value, if the field must not be present.static Matcher
anyValue()
Matches any non-null value at the target.static Matcher
arrayEquals
(List<? extends Object> pattern) Matches the specified pattern with the array found in the same relative path of the target.static Matcher
Matches the specified pattern with the array found in the same relative path of the target.static Matcher
Deep exact matching of the specified pattern to the target.static Matcher
Matches any target which does NOT follow the specified pattern.static Matcher
objectEquals
(Map<String, ? extends Object> pattern) Matches the specified pattern to an object found in the same relative path of the target.static Matcher
objectLike
(Map<String, ? extends Object> pattern) Matches the specified pattern to an object found in the same relative path of the target.static Matcher
serializedJson
(Object pattern) Matches any string-encoded JSON and applies the specified pattern after parsing it.static Matcher
stringLikeRegexp
(String pattern) Matches targets according to a regular expression.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
-
Match
protected Match(software.amazon.jsii.JsiiObjectRef objRef) -
Match
protected Match(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Match
@Stability(Stable) protected Match()
-
-
Method Details
-
absent
Use this matcher in the place of a field's value, if the field must not be present. -
anyValue
Matches any non-null value at the target. -
arrayEquals
@Stability(Stable) @NotNull public static Matcher arrayEquals(@NotNull List<? extends Object> pattern) Matches the specified pattern with the array found in the same relative path of the target.The set of elements (or matchers) must match exactly and in order.
- Parameters:
pattern
- the pattern to match. This parameter is required.
-
arrayWith
@Stability(Stable) @NotNull public static Matcher arrayWith(@NotNull List<? extends Object> pattern) Matches the specified pattern with the array found in the same relative path of the target.The set of elements (or matchers) must be in the same order as would be found.
- Parameters:
pattern
- the pattern to match. This parameter is required.
-
exact
Deep exact matching of the specified pattern to the target.- Parameters:
pattern
- the pattern to match. This parameter is required.
-
not
Matches any target which does NOT follow the specified pattern.- Parameters:
pattern
- the pattern to NOT match. This parameter is required.
-
objectEquals
@Stability(Stable) @NotNull public static Matcher objectEquals(@NotNull Map<String, ? extends Object> pattern) Matches the specified pattern to an object found in the same relative path of the target.The keys and their values (or matchers) must match exactly with the target.
- Parameters:
pattern
- the pattern to match. This parameter is required.
-
objectLike
@Stability(Stable) @NotNull public static Matcher objectLike(@NotNull Map<String, ? extends Object> pattern) Matches the specified pattern to an object found in the same relative path of the target.The keys and their values (or matchers) must be present in the target but the target can be a superset.
- Parameters:
pattern
- the pattern to match. This parameter is required.
-
serializedJson
Matches any string-encoded JSON and applies the specified pattern after parsing it.- Parameters:
pattern
- the pattern to match after parsing the encoded JSON. This parameter is required.
-
stringLikeRegexp
Matches targets according to a regular expression.- Parameters:
pattern
- This parameter is required.
-