Class PathBodyMatcher

    • Method Detail

      • path

        public String path()
        Specified by:
        path in interface BodyMatcher
        Returns:
        Path to the path. Example for JSON it will be JSON Path.
      • value

        public Object value()
        Specified by:
        value in interface BodyMatcher
        Returns:
        Optional value that the given path should be checked against. If there is no value then presence will be checked only together with type check. Example if we expect a JSON Path path $.a to be matched. by type, the defined response body contained an integer but the actual one contained a string then the assertion should fail.
      • minTypeOccurrence

        public Integer minTypeOccurrence()
        Specified by:
        minTypeOccurrence in interface BodyMatcher
        Returns:
        Min no of occurrence when matching by type. In all other cases it will be ignored.
      • maxTypeOccurrence

        public Integer maxTypeOccurrence()
        Specified by:
        maxTypeOccurrence in interface BodyMatcher
        Returns:
        Max no of occurrence when matching by type. In all other cases it will be ignored.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object