Class AnyMatcherWithExample
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- io.contract_testing.contractcase.definitions.matchers.base.AnyMatcher
-
- io.contract_testing.contractcase.definitions.matchers.base.AnyMatcherWithExample
-
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
- Direct Known Subclasses:
AnyBoolean,AnyInteger,AnyNull,AnyNumber,AnyString,ArrayEachEntryMatchesWithExample,HttpStatusCode,StringContaining
@Generated(value="jsii-pacmak/1.112.0 (build de1bc80)", date="2025-08-20T01:46:20.839Z") @Stability(Stable) public abstract class AnyMatcherWithExample extends AnyMatcher
The base class for all Test Equivalence Matchers that have examples provided.Extend this if your matcher knows what the example will be. Otherwise, use
matchers.AnyMatcher
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAnyMatcherWithExample(String matcherType, Object example)The base class for all Test Equivalence Matchers that have examples provided.protectedAnyMatcherWithExample(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)protectedAnyMatcherWithExample(software.amazon.jsii.JsiiObjectRef objRef)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjecttoJSON()For non-TypeScript implementations (seeAnyMatcher.toJSON).-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Constructor Detail
-
AnyMatcherWithExample
protected AnyMatcherWithExample(software.amazon.jsii.JsiiObjectRef objRef)
-
AnyMatcherWithExample
protected AnyMatcherWithExample(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
AnyMatcherWithExample
@Stability(Stable) protected AnyMatcherWithExample(@NotNull String matcherType, @NotNull Object example)The base class for all Test Equivalence Matchers that have examples provided.Extend this if your matcher knows what the example will be. Otherwise, use
matchers.AnyMatcherOnly use a type prefixed with
_case:if you wish to create a special case for a matching behaviour that is already provided by a core ContractCase matcher.- Parameters:
matcherType- - The type string for this matcher (see {@link https://case.contract-testing.io/docs/reference/plugin-framework Extending ContractCase} for a description of these strings). This parameter is required.example-- The data that will be used as the example for this matcher.
-
-
Method Detail
-
toJSON
@Stability(Stable) @NotNull public Object toJSON()
For non-TypeScript implementations (seeAnyMatcher.toJSON).- Overrides:
toJSONin classAnyMatcher- Returns:
- An object in the matcher format described {@link https://case.contract-testing.io/docs/reference/plugin-framework in the Extending ContractCase documentation}
-
-