public class FieldMatcher extends Object implements BodyMatcher
| Constructor and Description |
|---|
FieldMatcher(Map<String,String> formParams)
Creates a FieldMatcher expecting a map of keys and values
|
| Modifier and Type | Method and Description |
|---|---|
MatchStatus |
matches(List<String> body)
indicates if the Matcher succeeded in matching the body
|
static FieldMatcher |
of(String... keyValuePairs)
Creates a FieldMatcher expecting a map of keys and values
use like: FieldMatcher.of("fruit", "orange", "quantity" "42")
|
public static FieldMatcher of(String... keyValuePairs)
keyValuePairs - an array of key-value pairs to expectpublic MatchStatus matches(List<String> body) throws AssertionError
BodyMatchermatches in interface BodyMatcherbody - the list of body partsAssertionErrorCopyright © 2021. All rights reserved.