class Match
Language | Type name |
---|---|
.NET | Amazon.CDK.IntegTests.Match |
Java | software.amazon.awscdk.integtests.Match |
Python | aws_cdk.integ_tests.Match |
TypeScript (source) | @aws-cdk/integ-tests » Match |
Partial and special matching during assertions.
Initializer
new Match()
Methods
Name | Description |
---|---|
static array | Matches the specified pattern with the array found in the same relative path of the target. |
static object | Matches the specified pattern to an object found in the same relative path of the target. |
static string | Matches targets according to a regular expression. |
With(pattern)
static arraypublic static arrayWith(pattern: any[]): { [string]: any[] }
Parameters
- pattern
any[]
— the pattern to match.
Returns
{ [string]: any[] }
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.
Like(pattern)
static objectpublic static objectLike(pattern: { [string]: any }): { [string]: { [string]: any } }
Parameters
- pattern
{ [string]: any }
— the pattern to match.
Returns
{ [string]: { [string]: any } }
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.
LikeRegexp(pattern)
static stringpublic static stringLikeRegexp(pattern: string): { [string]: string }
Parameters
- pattern
string
Returns
{ [string]: string }
Matches targets according to a regular expression.