Class Match
Partial and special matching during template assertions.
Inheritance
Namespace: Amazon.CDK.Assertions
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class Match : DeputyBase
Syntax (vb)
Public MustInherit Class Match
Inherits DeputyBase
Synopsis
Constructors
Match() | |
Match(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Match(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
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(Object[]) | Matches the specified pattern with the array found in the same relative path of the target. |
ArrayWith(Object[]) | Matches the specified pattern with the array found in the same relative path of the target. |
Exact(Object) | Deep exact matching of the specified pattern to the target. |
Not(Object) | Matches any target which does NOT follow the specified pattern. |
ObjectEquals(IDictionary<String, Object>) | Matches the specified pattern to an object found in the same relative path of the target. |
ObjectLike(IDictionary<String, Object>) | Matches the specified pattern to an object found in the same relative path of the target. |
SerializedJson(Object) | Matches any string-encoded JSON and applies the specified pattern after parsing it. |
StringLikeRegexp(String) | Matches targets according to a regular expression. |
Constructors
Match()
protected Match()
Match(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected Match(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
Match(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected Match(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
Absent()
Use this matcher in the place of a field's value, if the field must not be present.
public static Matcher Absent()
Returns
AnyValue()
ArrayEquals(Object[])
Matches the specified pattern with the array found in the same relative path of the target.
public static Matcher ArrayEquals(object[] pattern)
Parameters
- pattern System.Object[]
the pattern to match.
Returns
Remarks
The set of elements (or matchers) must match exactly and in order.
ArrayWith(Object[])
Matches the specified pattern with the array found in the same relative path of the target.
public static Matcher ArrayWith(object[] pattern)
Parameters
- pattern System.Object[]
the pattern to match.
Returns
Remarks
The set of elements (or matchers) must be in the same order as would be found.
Exact(Object)
Deep exact matching of the specified pattern to the target.
public static Matcher Exact(object pattern)
Parameters
- pattern System.Object
the pattern to match.
Returns
Not(Object)
Matches any target which does NOT follow the specified pattern.
public static Matcher Not(object pattern)
Parameters
- pattern System.Object
the pattern to NOT match.
Returns
ObjectEquals(IDictionary<String, Object>)
Matches the specified pattern to an object found in the same relative path of the target.
public static Matcher ObjectEquals(IDictionary<string, object> pattern)
Parameters
- pattern System.Collections.Generic.IDictionary<System.String, System.Object>
the pattern to match.
Returns
Remarks
The keys and their values (or matchers) must match exactly with the target.
ObjectLike(IDictionary<String, Object>)
Matches the specified pattern to an object found in the same relative path of the target.
public static Matcher ObjectLike(IDictionary<string, object> pattern)
Parameters
- pattern System.Collections.Generic.IDictionary<System.String, System.Object>
the pattern to match.
Returns
Remarks
The keys and their values (or matchers) must be present in the target but the target can be a superset.
SerializedJson(Object)
Matches any string-encoded JSON and applies the specified pattern after parsing it.
public static Matcher SerializedJson(object pattern)
Parameters
- pattern System.Object
the pattern to match after parsing the encoded JSON.
Returns
StringLikeRegexp(String)
Matches targets according to a regular expression.
public static Matcher StringLikeRegexp(string pattern)
Parameters
- pattern System.String
Returns