com.atlassian.jira.functest.matcher
Class HeaderValue
java.lang.Object
org.hamcrest.BaseMatcher<T>
org.junit.internal.matchers.TypeSafeMatcher<com.meterware.httpunit.WebResponse>
com.atlassian.jira.functest.matcher.HeaderValue
- All Implemented Interfaces:
- org.hamcrest.Matcher<com.meterware.httpunit.WebResponse>, org.hamcrest.SelfDescribing
public class HeaderValue
- extends org.junit.internal.matchers.TypeSafeMatcher<com.meterware.httpunit.WebResponse>
Matcher that checks that the response contains a specific HTTP header with the given value.
- Since:
- v4.3
Constructor Summary |
HeaderValue(String headerName,
org.hamcrest.Matcher<String> headerValue)
Creates a new HasHeaderWithValue matcher. |
Method Summary |
void |
describeTo(org.hamcrest.Description description)
|
static org.hamcrest.Matcher<com.meterware.httpunit.WebResponse> |
header(String headerName,
org.hamcrest.Matcher<String> headerValue)
Asserts that a WebResponse has a header with the given value. |
boolean |
matchesSafely(com.meterware.httpunit.WebResponse response)
|
Methods inherited from class org.junit.internal.matchers.TypeSafeMatcher |
matches |
Methods inherited from class org.hamcrest.BaseMatcher |
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString |
HeaderValue
public HeaderValue(String headerName,
org.hamcrest.Matcher<String> headerValue)
- Creates a new HasHeaderWithValue matcher.
- Parameters:
headerName
- a String containing the header's nameheaderValue
- a Matcher for the header's value
header
public static org.hamcrest.Matcher<com.meterware.httpunit.WebResponse> header(String headerName,
org.hamcrest.Matcher<String> headerValue)
- Asserts that a WebResponse has a header with the given value.
- Parameters:
headerName
- a String containing the header's expected nameheaderValue
- a String containing the header's expected value
- Returns:
- a new Matcher
matchesSafely
public boolean matchesSafely(com.meterware.httpunit.WebResponse response)
- Specified by:
matchesSafely
in class org.junit.internal.matchers.TypeSafeMatcher<com.meterware.httpunit.WebResponse>
describeTo
public void describeTo(org.hamcrest.Description description)
Copyright © 2002-2012 Atlassian. All Rights Reserved.