public class CommonFixture extends Object
| Modifier and Type | Field and Description |
|---|---|
protected com.sun.jersey.api.client.Client |
client
HTTP client component (JAX-RS Client API).
|
protected static String |
REFINTERGRITY_SCH
Define XSD path
|
protected com.sun.jersey.api.client.ClientRequest |
request
An HTTP request message.
|
protected com.sun.jersey.api.client.ClientResponse |
response
An HTTP response message.
|
static String |
ROOT_PKG_PATH
Root test suite package (absolute path).
|
protected Document |
testSubject |
protected static String |
XSD_APPEARANCE |
protected static String |
XSD_BRIDGE |
protected static String |
XSD_BUILDING |
protected static String |
XSD_CITYFURNITURE |
protected static String |
XSD_CITYGMLCORE |
protected static String |
XSD_CITYOBJECTGROUP |
protected static String |
XSD_GENERICS |
protected static String |
XSD_LANDUSE |
protected static String |
XSD_RELIF |
protected static String |
XSD_TRANSPORTATION |
protected static String |
XSD_TUNNEL |
protected static String |
XSD_VEGETATION |
protected static String |
XSD_WATERBODY |
| 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.
|
protected ArrayList<String> |
GetToValidateXsdPathArrayList(Document doc) |
void |
initCommonFixture(org.testng.ITestContext testContext)
Initializes the common test fixture with a client component for
interacting with HTTP endpoints.
|
boolean |
isMultipleXMLSchemaValid(String xmlString,
String[] arrXsdPath)
Description: Identify that a XML document is valid with XSD Template or not
|
String |
TransformXMLDocumentToXMLString(Document xmlDoc)
Transform XML Document to UTF-8 String
|
public static final String ROOT_PKG_PATH
protected com.sun.jersey.api.client.Client client
protected com.sun.jersey.api.client.ClientRequest request
protected com.sun.jersey.api.client.ClientResponse response
protected Document testSubject
protected static final String REFINTERGRITY_SCH
protected static final String XSD_APPEARANCE
protected static final String XSD_BRIDGE
protected static final String XSD_BUILDING
protected static final String XSD_CITYFURNITURE
protected static final String XSD_CITYGMLCORE
protected static final String XSD_CITYOBJECTGROUP
protected static final String XSD_GENERICS
protected static final String XSD_LANDUSE
protected static final String XSD_RELIF
protected static final String XSD_TRANSPORTATION
protected static final String XSD_TUNNEL
protected static final String XSD_VEGETATION
protected static final String XSD_WATERBODY
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...)public String TransformXMLDocumentToXMLString(Document xmlDoc) throws Exception
xmlDoc - The XML DocumentException - TransformerConfigurationException, TransformerExceptionpublic boolean isMultipleXMLSchemaValid(String xmlString, String[] arrXsdPath)
xmlString - The XML StringarrXsdPath - A String Array of XSD PathCopyright © 2023 Open Geospatial Consortium. All rights reserved.