Interface BodyMatcher
- All Known Implementing Classes:
PathBodyMatcher
public interface BodyMatcher
Matchers for the given path.
- Since:
- 1.0.3
- Author:
- Marcin Grzejszczak
-
Method Details
-
matchingType
MatchingType matchingType()- Returns:
- What kind of matching are we dealing with.
-
path
String path()- Returns:
- Path to the path. Example for JSON it will be JSON Path.
-
value
Object value()- 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
Integer minTypeOccurrence()- Returns:
- Min no of occurrence when matching by type. In all other cases it will be ignored.
-
maxTypeOccurrence
Integer maxTypeOccurrence()- Returns:
- Max no of occurrence when matching by type. In all other cases it will be ignored.
-