Class AnyMatcher

    • 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 AnyMatcher​(String matcherType)
      The base class for all Test Equivalence Matchers.
      protected AnyMatcher​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)  
      protected AnyMatcher​(software.amazon.jsii.JsiiObjectRef objRef)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Object toJSON()
      Only override this method if you are writing a matcher in a language other than TypeScript.
      • 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

      • AnyMatcher

        protected AnyMatcher​(software.amazon.jsii.JsiiObjectRef objRef)
      • AnyMatcher

        protected AnyMatcher​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
      • AnyMatcher

        @Stability(Stable)
        protected AnyMatcher​(@NotNull
                             String matcherType)
        The base class for all Test Equivalence Matchers.

        Extend this if you don't have an example in your Matcher. Otherwise, use matchers.internals.AnyMatcherWithExample Matcher strings beginning with `_case:` are reserved for the default ContractCase matchers. Only use a types 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.
    • Method Detail

      • toJSON

        @Stability(Stable)
        @NotNull
        public Object toJSON()
        Only override this method if you are writing a matcher in a language other than TypeScript.

        It exists because the ContractCase matcher format is not legal in all languages that ContractCase supports. WARNING: Do not return a string from this method. You must instead return an object that can be serialised to JSON following the matcher format described in {@link https://case.contract-testing.io/docs/reference/plugin-framework Extending ContractCase}.

        Returns:
        An object in the matcher format described {@link https://case.contract-testing.io/docs/reference/plugin-framework in the Extending ContractCase documentation}