Package org.mockserver.matchers
Class MultipartMatcher
java.lang.Object
org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
org.mockserver.matchers.NotMatcher<MatchedType>
org.mockserver.matchers.BodyMatcher<MultipartMatcher.MultipartInput>
org.mockserver.matchers.MultipartMatcher
- All Implemented Interfaces:
Matcher<MultipartMatcher.MultipartInput>
Matches a
multipart/form-data request body at the field level.
The body matcher decodes the actual request's multipart body into per-field
Parameters maps (values, filenames and part content types) and matches
each against the corresponding map declared on the MultipartBody,
reusing MultiValueMapMatcher so the matching semantics are identical
to form-parameter matching (regular expressions, negation, sub-set keys).
- Author:
- jamesdbloom
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe pair of values needed to decode an actual multipart request: the raw body bytes and the requestContent-Typeheader (carrying the boundary). -
Constructor Summary
ConstructorsConstructorDescriptionMultipartMatcher(MockServerLogger mockServerLogger, MultipartBody multipartBody, boolean controlPlaneMatcher) -
Method Summary
Modifier and TypeMethodDescriptionprotected String[]booleanisBlank()booleanmatches(MatchDifference context, MultipartMatcher.MultipartInput matched) Methods inherited from class org.mockserver.matchers.NotMatcher
notMatcherMethods inherited from class org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
equals, hashCode, toString
-
Constructor Details
-
MultipartMatcher
public MultipartMatcher(MockServerLogger mockServerLogger, MultipartBody multipartBody, boolean controlPlaneMatcher)
-
-
Method Details
-
matches
-
isBlank
public boolean isBlank() -
fieldsExcludedFromEqualsAndHashCode
- Overrides:
fieldsExcludedFromEqualsAndHashCodein classObjectWithReflectiveEqualsHashCodeToString
-