Package 

Object PM


  • 
    public class PM
    
                        

    Pact Matcher functions for 'and' and 'or'

    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final static PM INSTANCE
    • Method Summary

      Modifier and Type Method Description
      final static TypeMatcher stringType() Attribute that can be any string
      final static NumberTypeMatcher numberType() Attribute that can be any number
      final static NumberTypeMatcher integerType() Attribute that must be an integer
      final static NumberTypeMatcher decimalType() Attribute that must be a decimal value
      final static TypeMatcher booleanType() Attribute that must be a boolean
      final static RegexMatcher stringMatcher(String regex, String example) Attribute that must match the regular expression
      final static RegexMatcher stringMatcher(String regex) Attribute that must match the regular expression
      final static TimestampMatcher timestamp() Attribute that must be an ISO formatted timestamp
      final static TimestampMatcher timestamp(String format) Attribute that must match the given timestamp format
      final static DateMatcher date() Attribute that must be formatted as an ISO date
      final static DateMatcher date(String format) Attribute that must match the provided date format
      final static TimeMatcher time() Attribute that must be an ISO formatted time
      final static TimeMatcher time(String format) Attribute that must match the given time format
      final static RegexMatcher ipAddress() Attribute that must be an IP4 address
      final static TypeMatcher id() Attribute that must be a numeric identifier
      final static RegexMatcher hexValue() Attribute that must be encoded as a hexadecimal value
      final static RegexMatcher uuid() Attribute that must be encoded as an UUID
      final static NullMatcher nullValue() Matches a null value
      final static IncludeMatcher includesStr(String value) Attribute that must include the provided string value
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • stringType

         final static TypeMatcher stringType()

        Attribute that can be any string

      • numberType

         final static NumberTypeMatcher numberType()

        Attribute that can be any number

      • integerType

         final static NumberTypeMatcher integerType()

        Attribute that must be an integer

      • decimalType

         final static NumberTypeMatcher decimalType()

        Attribute that must be a decimal value

      • booleanType

         final static TypeMatcher booleanType()

        Attribute that must be a boolean

      • stringMatcher

        @JvmOverloads() final static RegexMatcher stringMatcher(String regex, String example)

        Attribute that must match the regular expression

        Parameters:
        regex - regular expression
      • stringMatcher

        @JvmOverloads() final static RegexMatcher stringMatcher(String regex)

        Attribute that must match the regular expression

        Parameters:
        regex - regular expression
      • timestamp

         final static TimestampMatcher timestamp()

        Attribute that must be an ISO formatted timestamp

      • timestamp

         final static TimestampMatcher timestamp(String format)

        Attribute that must match the given timestamp format

        Parameters:
        format - timestamp format
      • date

         final static DateMatcher date()

        Attribute that must be formatted as an ISO date

      • date

         final static DateMatcher date(String format)

        Attribute that must match the provided date format

        Parameters:
        format - date format to match
      • time

         final static TimeMatcher time()

        Attribute that must be an ISO formatted time

      • time

         final static TimeMatcher time(String format)

        Attribute that must match the given time format

        Parameters:
        format - time format to match
      • ipAddress

         final static RegexMatcher ipAddress()

        Attribute that must be an IP4 address

      • id

         final static TypeMatcher id()

        Attribute that must be a numeric identifier

      • hexValue

         final static RegexMatcher hexValue()

        Attribute that must be encoded as a hexadecimal value

      • uuid

         final static RegexMatcher uuid()

        Attribute that must be encoded as an UUID

      • nullValue

         final static NullMatcher nullValue()

        Matches a null value

      • includesStr

         final static IncludeMatcher includesStr(String value)

        Attribute that must include the provided string value

        Parameters:
        value - Value that must be included