public static class TestHttpServer.RequestProperties extends Object
TestHttpServer.respondIf(org.hamcrest.Matcher<com.atlassian.utt.http.TestHttpServer.RequestProperties>, com.atlassian.utt.http.TestHttpServer.ResponseProperties).
You won't need to construct this class yourself, but it contains static matcher methods
such as method.| Modifier and Type | Method and Description |
|---|---|
static NamedFunction<TestHttpServer.RequestProperties,Iterable<String>> |
header(String name)
Use this to construct a Hamcrest matcher for a single expected request header.
|
static NamedFunction<TestHttpServer.RequestProperties,Map<? extends String,? extends List<String>>> |
headers()
Use this to construct a Hamcrest matcher for the headers of an expected request,
represented as a multi-valued Map.
|
static NamedFunction<TestHttpServer.RequestProperties,String> |
method()
Use this to construct a Hamcrest matcher for the HTTP method of an expected
request.
|
static NamedFunction<TestHttpServer.RequestProperties,String> |
requestBody()
Use this to construct a Hamcrest matcher for the request body as a String.
|
static org.hamcrest.Matcher<TestHttpServer.RequestProperties> |
requestHasBasicAuth(String hash)
A Hamcrest matcher that asserts that the request had an authorization header
using basic authentication.
|
static org.hamcrest.Matcher<TestHttpServer.RequestProperties> |
requestHasNoAuth()
A Hamcrest matcher that asserts that the request did not have any authorization
header.
|
static org.hamcrest.Matcher<TestHttpServer.RequestProperties> |
requestHasNoProxyAuth()
A Hamcrest matcher that asserts that the request did not have any proxy
authorization header.
|
static org.hamcrest.Matcher<TestHttpServer.RequestProperties> |
requestHasProxyAuth()
A Hamcrest matcher that asserts that the request had a proxy authorization header.
|
static org.hamcrest.Matcher<TestHttpServer.RequestProperties> |
requestHasProxyBasicAuth(String hash)
A Hamcrest matcher that asserts that the request had a proxy authorization header
using basic authentication.
|
static org.hamcrest.Matcher<TestHttpServer.RequestProperties> |
requestHasProxyDigestAuth()
A Hamcrest matcher that asserts that the request had a proxy authorization header
using digest authentication.
|
String |
toString() |
static NamedFunction<TestHttpServer.RequestProperties,URI> |
uri()
Use this to construct a Hamcrest matcher for the URI of an expected request.
|
public static NamedFunction<TestHttpServer.RequestProperties,String> method()
NamedFunctionpublic static NamedFunction<TestHttpServer.RequestProperties,URI> uri()
NamedFunctionpublic static NamedFunction<TestHttpServer.RequestProperties,Map<? extends String,? extends List<String>>> headers()
header(java.lang.String) instead.NamedFunctionpublic static NamedFunction<TestHttpServer.RequestProperties,Iterable<String>> header(String name)
headers instead.NamedFunctionpublic static NamedFunction<TestHttpServer.RequestProperties,String> requestBody()
NamedFunctionpublic static org.hamcrest.Matcher<TestHttpServer.RequestProperties> requestHasNoAuth()
NamedFunctionpublic static org.hamcrest.Matcher<TestHttpServer.RequestProperties> requestHasBasicAuth(String hash)
hash - the expected authentication hashNamedFunctionpublic static org.hamcrest.Matcher<TestHttpServer.RequestProperties> requestHasNoProxyAuth()
NamedFunctionpublic static org.hamcrest.Matcher<TestHttpServer.RequestProperties> requestHasProxyAuth()
NamedFunctionpublic static org.hamcrest.Matcher<TestHttpServer.RequestProperties> requestHasProxyBasicAuth(String hash)
hash - the expected authentication hashNamedFunctionpublic static org.hamcrest.Matcher<TestHttpServer.RequestProperties> requestHasProxyDigestAuth()
NamedFunctionCopyright © 2017 Atlassian. All rights reserved.