@Immutable @ThreadSafe public class StrictHeadersMatcher extends org.hamcrest.TypeSafeMatcher<HttpRequest>
Concurrency notes. This class is immutable and thread safe.
| Constructor and Description |
|---|
StrictHeadersMatcher(Set<String> specifiedHeaders)
Creates new matcher.
|
| Modifier and Type | Method and Description |
|---|---|
void |
describeMismatchSafely(HttpRequest httpRequest,
org.hamcrest.Description description) |
void |
describeTo(org.hamcrest.Description description) |
boolean |
matchesSafely(HttpRequest httpRequest) |
public StrictHeadersMatcher(Set<String> specifiedHeaders)
specifiedHeaders - Specified set of header names. If a request has a
header not from this set, then it does not match. Empty set means only
requests without headers match.NullPointerException - specifiedHeaders is null.public boolean matchesSafely(HttpRequest httpRequest)
matchesSafely in class org.hamcrest.TypeSafeMatcher<HttpRequest>public void describeTo(org.hamcrest.Description description)
public void describeMismatchSafely(HttpRequest httpRequest, org.hamcrest.Description description)
describeMismatchSafely in class org.hamcrest.TypeSafeMatcher<HttpRequest>Copyright © 2016. All rights reserved.