Class WithExample
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- io.contract_testing.contractcase.definitions.matchers.base.AnyMatcher
-
- io.contract_testing.contractcase.definitions.matchers.base.CascadingContextMatcher
-
- io.contract_testing.contractcase.definitions.matchers.convenience.WithExample
-
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.112.0 (build de1bc80)", date="2025-08-20T01:46:20.842Z") @Stability(Stable) public class WithExample extends CascadingContextMatcher
Adds an example to the provided matcher.Useful when you have a complicated set of constraints and ContractCase can't figure out what the best example should be.
Note that providing any example will override examples provided further down the tree.
-
-
Constructor Summary
Constructors Modifier Constructor Description WithExample(Object matcher, Object example)Adds an example to the provided matcher.protectedWithExample(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)protectedWithExample(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
-
WithExample
protected WithExample(software.amazon.jsii.JsiiObjectRef objRef)
-
WithExample
protected WithExample(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
WithExample
@Stability(Stable) public WithExample(@NotNull Object matcher, @NotNull Object example)Adds an example to the provided matcher.Useful when you have a complicated set of
matchers.convenience.Andconstraints and ContractCase can't figure out what the best example should be. Note that providing any example will override examples provided further down the tree.- Parameters:
matcher-- Any matcher to add an example to.
example-- The example to use when stripping the matchers.
-
-
Method Detail
-
toJSON
@Stability(Stable) @NotNull public Object toJSON()
For non-TypeScript implementations (seeAnyMatcher.toJSON).- Overrides:
toJSONin classCascadingContextMatcher- Returns:
- An object in the matcher format described {@link https://case.contract-testing.io/docs/reference/plugin-framework in the Extending ContractCase documentation}
-
-