public class WisdomBlackBoxTest extends Object implements org.wisdom.api.http.HeaderNames, org.wisdom.api.http.Status
| Modifier and Type | Field and Description |
|---|---|
private String |
hostname |
private int |
httpPort |
private int |
httpsPort |
private static org.slf4j.Logger |
LOGGER |
ACCEPT, ACCEPT_CHARSET, ACCEPT_ENCODING, ACCEPT_LANGUAGE, ACCEPT_RANGES, ACCESS_CONTROL_ALLOW_CREDENTIALS, ACCESS_CONTROL_ALLOW_HEADERS, ACCESS_CONTROL_ALLOW_METHODS, ACCESS_CONTROL_ALLOW_ORIGIN, ACCESS_CONTROL_EXPOSE_HEADERS, ACCESS_CONTROL_MAX_AGE, ACCESS_CONTROL_REQUEST_HEADERS, ACCESS_CONTROL_REQUEST_METHOD, AGE, ALLOW, AUTHORIZATION, CACHE_CONTROL, CONNECTION, CONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_LOCATION, CONTENT_MD5, CONTENT_RANGE, CONTENT_TRANSFER_ENCODING, CONTENT_TYPE, COOKIE, DATE, ETAG, EXPECT, EXPIRES, FROM, HOST, IF_MATCH, IF_MODIFIED_SINCE, IF_NONE_MATCH, IF_RANGE, IF_UNMODIFIED_SINCE, LAST_MODIFIED, LOCATION, MAX_FORWARDS, NOCACHE_VALUE, ORIGIN, PRAGMA, PROXY_AUTHENTICATE, PROXY_AUTHORIZATION, RANGE, REFERER, RETRY_AFTER, SERVER, SET_COOKIE, SET_COOKIE2, TE, TRAILER, TRANSFER_ENCODING, UPGRADE, USER_AGENT, VARY, VIA, WARNING, WWW_AUTHENTICATE, X_FORWARD_FOR, X_WISDOM_DISABLED_ENCODING_HEADERACCEPTED, BAD_GATEWAY, BAD_REQUEST, CONFLICT, CONTINUE, CREATED, EXPECTATION_FAILED, FORBIDDEN, FOUND, GATEWAY_TIMEOUT, GONE, HTTP_VERSION_NOT_SUPPORTED, INTERNAL_SERVER_ERROR, LENGTH_REQUIRED, METHOD_NOT_ALLOWED, MOVED_PERMANENTLY, MULTIPLE_CHOICES, NO_CONTENT, NON_AUTHORITATIVE_INFORMATION, NOT_ACCEPTABLE, NOT_FOUND, NOT_IMPLEMENTED, NOT_MODIFIED, OK, PARTIAL_CONTENT, PAYMENT_REQUIRED, PRECONDITION_FAILED, PROXY_AUTHENTICATION_REQUIRED, REQUEST_ENTITY_TOO_LARGE, REQUEST_TIMEOUT, REQUEST_URI_TOO_LONG, REQUESTED_RANGE_NOT_SATISFIABLE, RESET_CONTENT, SEE_OTHER, SERVICE_UNAVAILABLE, SWITCHING_PROTOCOLS, TEMPORARY_REDIRECT, UNAUTHORIZED, UNSUPPORTED_MEDIA_TYPE, USE_PROXY| Constructor and Description |
|---|
WisdomBlackBoxTest() |
| Modifier and Type | Method and Description |
|---|---|
HttpRequestWithBody |
delete(String url)
Creates a 'DELETE' request.
|
GetRequest |
get(String url)
Creates a request using the 'GET' verb.
|
String |
getHttpsURl(String path)
Computes the full url from the given path.
|
String |
getHttpURl(String path)
Computes the full url from the given path.
|
static void |
installTestBundle() |
HttpRequestWithBody |
post(String url)
Creates a 'POST' request.
|
HttpRequestWithBody |
put(String url)
Creates a 'PUT' request.
|
static void |
removeTestBundle() |
void |
retrieveServerMetadata()
Methods call by the test framework to discover the server name and port.
|
private static final org.slf4j.Logger LOGGER
private String hostname
private int httpPort
private int httpsPort
public static void installTestBundle()
throws org.osgi.framework.BundleException
org.osgi.framework.BundleExceptionpublic static void removeTestBundle()
throws org.osgi.framework.BundleException
org.osgi.framework.BundleExceptionpublic void retrieveServerMetadata()
throws Exception
Exception - if the service is not running.public String getHttpURl(String path)
path - the pathpublic String getHttpsURl(String path)
path - the pathpublic GetRequest get(String url)
url - the pathpublic HttpRequestWithBody post(String url)
url - the pathpublic HttpRequestWithBody delete(String url)
url - the pathpublic HttpRequestWithBody put(String url)
url - the pathCopyright © 2013–2015 Wisdom Framework. All rights reserved.