NamedMatch
Saves the matcher below it with a unique name that can be used with lookups in tests after this one.
Lookups can be made with matchers.convenience.ReferenceMatch.
- Typescript
- Java
import { matchers } from '@contract-case/case-definition-dsl'
new matchers.convenience.NamedMatch(name: string, child: any)
Parameters
Name | Type | Description |
---|---|---|
name | string | The name you can use to lookup this matcher later. |
child | any | The content of this named match. If omitted or undefined, the content will be looked up in a previously named match |
import io.contract_testing.contractcase.definitions.matchers.convenience.NamedMatch;
new NamedMatch(java.lang.String name, java.lang.Object child);
Parameters
Name | Type | Description |
---|---|---|
name | java.lang.String | The name you can use to lookup this matcher later. |
child | java.lang.Object | The content of this named match. If omitted or undefined, the content will be looked up in a previously named match |