Class FieldMatcher
java.lang.Object
kong.unirest.core.FieldMatcher
- All Implemented Interfaces:
BodyMatcher
Matches simple form fields
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFieldMatcher(Map<String, String> formParams) Creates a FieldMatcher expecting a map of keys and values -
Method Summary
Modifier and TypeMethodDescriptionprivate Stringdescription(boolean pass, List<String> missing) private static <K,V> Map <K, V> indicates if the Matcher succeeded in matching the bodystatic FieldMatcherCreates a FieldMatcher expecting a map of keys and values use like: FieldMatcher.of("fruit", "orange", "quantity" "42")
-
Field Details
-
formParams
-
-
Constructor Details
-
FieldMatcher
-
-
Method Details
-
of
Creates a FieldMatcher expecting a map of keys and values use like: FieldMatcher.of("fruit", "orange", "quantity" "42")- Parameters:
keyValuePairs- an array of key-value pairs to expect- Returns:
- a new FieldMatcher
-
matches
Description copied from interface:BodyMatcherindicates if the Matcher succeeded in matching the body- Specified by:
matchesin interfaceBodyMatcher- Parameters:
body- the list of body parts- Returns:
- MatchStatus indicating if the Matcher succeeded in matching the body
- Throws:
AssertionError
-
description
-
mapOf
-