Package com.jcabi.http.mock
Class MkQueryMatchers
java.lang.Object
com.jcabi.http.mock.MkQueryMatchers
Convenient set of matchers for
MkQuery.- Since:
- 1.5
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.hamcrest.Matcher<MkQuery>Matches the value of the MkQuery's body against the given matcher.static org.hamcrest.Matcher<MkQuery>Matches the content of the MkQuery's header against the given matcher.static org.hamcrest.Matcher<MkQuery>Matches the path of the MkQuery.static org.hamcrest.Matcher<MkQuery>Matches the query of the MkQuery.
-
Method Details
-
hasBody
Matches the value of the MkQuery's body against the given matcher.- Parameters:
matcher- The matcher to use.- Returns:
- Matcher for checking the body of MkQuery
-
hasHeader
public static org.hamcrest.Matcher<MkQuery> hasHeader(String header, org.hamcrest.Matcher<Iterable<? extends String>> matcher) Matches the content of the MkQuery's header against the given matcher. Note that for a valid match to occur, the header entry must exist and its value(s) must match the given matcher.- Parameters:
header- The header to check.matcher- The matcher to use.- Returns:
- Matcher for checking the body of MkQuery
-
hasPath
Matches the path of the MkQuery.- Parameters:
path- The path to check.- Returns:
- Matcher for checking the path of MkQuery
-
hasQuery
Matches the query of the MkQuery.- Parameters:
query- The query to check.- Returns:
- Matcher for checking the query of MkQuery
-