Class AnyMatcherWithExample

    • Nested Class Summary

      • Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

        software.amazon.jsii.JsiiObject.InitializationMode
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AnyMatcherWithExample​(String matcherType, Object example)
      The base class for all Test Equivalence Matchers that have examples provided.
      protected AnyMatcherWithExample​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)  
      protected AnyMatcherWithExample​(software.amazon.jsii.JsiiObjectRef objRef)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Object toJSON()
      For non-TypeScript implementations (see AnyMatcher.toJSON).
      • Methods inherited from class software.amazon.jsii.JsiiObject

        jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
      • Methods inherited from interface software.amazon.jsii.JsiiSerializable

        $jsii$toJson
    • 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.AnyMatcher

        Only 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.
        This parameter is required.
    • Method Detail

      • toJSON

        @Stability(Stable)
        @NotNull
        public Object toJSON()
        For non-TypeScript implementations (see AnyMatcher.toJSON).
        Overrides:
        toJSON in class AnyMatcher
        Returns:
        An object in the matcher format described {@link https://case.contract-testing.io/docs/reference/plugin-framework in the Extending ContractCase documentation}