Class PathBodyMatcher
java.lang.Object
org.springframework.cloud.contract.spec.internal.PathBodyMatcher
- All Implemented Interfaces:
BodyMatcher
- Author:
- Marcin Grzejszczak
-
Method Details
-
matchingType
- Specified by:
matchingTypein interfaceBodyMatcher- Returns:
- What kind of matching are we dealing with.
-
path
- Specified by:
pathin interfaceBodyMatcher- Returns:
- Path to the path. Example for JSON it will be JSON Path.
-
value
- Specified by:
valuein interfaceBodyMatcher- 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
$.ato be matched. by type, the defined response body contained an integer but the actual one contained a string then the assertion should fail.
-
minTypeOccurrence
- Specified by:
minTypeOccurrencein interfaceBodyMatcher- Returns:
- Min no of occurrence when matching by type. In all other cases it will be ignored.
-
maxTypeOccurrence
- Specified by:
maxTypeOccurrencein interfaceBodyMatcher- Returns:
- Max no of occurrence when matching by type. In all other cases it will be ignored.
-
equals
-
hashCode
public int hashCode() -
toString
-