public class CommonFixture extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Document |
capabilitiesDoc
A DOM document containing service metadata (OGC capabilities).
|
protected CSWClient |
cswClient
A client component for interacting with a WFS.
|
protected Document |
requestDocument
An HTTP request message.
|
protected com.sun.jersey.api.client.ClientResponse |
response
An HTTP response message.
|
protected Document |
responseDocument
The response document parsed from the HTTP response.
|
static String |
ROOT_PKG_PATH
Root test suite package (absolute path).
|
| Constructor and Description |
|---|
CommonFixture() |
| Modifier and Type | Method and Description |
|---|---|
com.sun.jersey.api.client.ClientRequest |
buildGetRequest(URI endpoint,
Map<String,String> qryParams,
javax.ws.rs.core.MediaType... mediaTypes)
Builds an HTTP request message that uses the GET method.
|
void |
clearMessages() |
Document |
getResponseEntityAsDocument(com.sun.jersey.api.client.ClientResponse response,
String targetURI)
Obtains the (XML) response entity as a DOM Document.
|
void |
initCommonFixture(org.testng.ITestContext testContext)
Initializes the common test fixture with a client component for interacting with HTTP endpoints.
|
public static final String ROOT_PKG_PATH
protected Document capabilitiesDoc
protected CSWClient cswClient
protected Document requestDocument
protected com.sun.jersey.api.client.ClientResponse response
protected Document responseDocument
public void initCommonFixture(org.testng.ITestContext testContext)
testContext - The test context that contains all the information for a test run, including suite attributes.public void clearMessages()
public Document getResponseEntityAsDocument(com.sun.jersey.api.client.ClientResponse response, String targetURI)
response - A representation of an HTTP response message.targetURI - The target URI from which the entity was retrieved (may be null).ClientUtils.getResponseEntityAsDocument(com.sun.jersey.api.client.ClientResponse, java.lang.String)public com.sun.jersey.api.client.ClientRequest buildGetRequest(URI endpoint, Map<String,String> qryParams, javax.ws.rs.core.MediaType... mediaTypes)
endpoint - A URI indicating the target resource.qryParams - A Map containing query parameters (may be null);mediaTypes - A list of acceptable media types; if not specified, generic XML ("application/xml") is preferred.ClientUtils.buildGetRequest(java.net.URI, java.util.Map<java.lang.String, java.lang.String>, javax.ws.rs.core.MediaType...)Copyright © 2018 Open Geospatial Consortium. All rights reserved.