Package kong.unirest.core
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 String
description
(boolean pass, List<String> missing) private static <K,
V> Map <K, V> indicates if the Matcher succeeded in matching the bodystatic FieldMatcher
Creates a FieldMatcher expecting a map of keys and values use like: FieldMatcher.of("fruit", "orange", "quantity" "42")
-
Field Details
-
formParams
-
-
Constructor Details
-
FieldMatcher
Creates a FieldMatcher expecting a map of keys and values- Parameters:
formParams
- the map of field params
-
-
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:BodyMatcher
indicates if the Matcher succeeded in matching the body- Specified by:
matches
in interfaceBodyMatcher
- Parameters:
body
- the list of body parts- Returns:
- MatchStatus indicating if the Matcher succeeded in matching the body
- Throws:
AssertionError
-
description
-
mapOf
-