public class BaseFixture extends Object
Modifier and Type | Field and Description |
---|---|
protected DocumentBuilder |
docBuilder
A DOM parser.
|
protected Map<QName,FeatureTypeInfo> |
featureInfo |
protected List<QName> |
featureTypes |
protected Document |
reqEntity
A Document representing the content of the request message.
|
protected Set<ProtocolBinding> |
supportedBindings |
protected static String |
TNS_PREFIX |
protected WFSClient |
wfsClient
A client component for interacting with a WFS.
|
protected Document |
wfsMetadata
A DOM document containing service metadata (OGC capabilities).
|
Constructor and Description |
---|
BaseFixture() |
Modifier and Type | Method and Description |
---|---|
void |
addAttributesIfTestFailed(org.testng.ITestResult result)
Augments the test result with supplementary attributes in the event that
a test method failed.
|
Iterator<Object[]> |
allProtocolsAndFeatureTypes()
A DataProvider that supplies parameters specifying a supported protocol
binding and a feature type.
|
protected Document |
extractBodyAsDocument(com.sun.jersey.api.client.ClientResponse rsp,
ProtocolBinding binding)
Extracts the body of the response message as a DOM Document node.
|
Object[][] |
getFeatureTypes()
A DataProvider that supplies the complete set of feature types recognized
by the SUT.
|
Iterator<Object[]> |
getInstantiatedFeatureTypes()
A DataProvider that supplies feature type names for which instances
exist.
|
Object[][] |
getProtocolBindings()
A DataProvider that supplies the set of application protocol bindings
supported by the SUT.
|
void |
initBaseFixture(org.testng.ITestContext testContext)
Sets up the base fixture.
|
void |
initParser()
Initializes the (namespace-aware) DOM parser.
|
Iterator<Object[]> |
protocolAndAvailableFeatureTypes(Method method)
A DataProvider that supplies parameters specifying a supported protocol
binding and an available feature type (at least one valid instance exists
in the data store).
|
protected Document wfsMetadata
protected WFSClient wfsClient
protected Set<ProtocolBinding> supportedBindings
protected Map<QName,FeatureTypeInfo> featureInfo
protected DocumentBuilder docBuilder
protected static final String TNS_PREFIX
protected Document reqEntity
public void initBaseFixture(org.testng.ITestContext testContext)
testSubject
should yield a DOM
Document node having {http://www.opengis.net/wfs/2.0}WFS_Capabilities as
the document element.
The set of implemented protocol bindings is determined from the service
metadata by checking the values of the following service constraints:
testContext
- The test (set) context.public void initParser()
public void addAttributesIfTestFailed(org.testng.ITestResult result)
public Object[][] getProtocolBindings()
public Object[][] getFeatureTypes()
public Iterator<Object[]> getInstantiatedFeatureTypes()
public Iterator<Object[]> allProtocolsAndFeatureTypes()
public Iterator<Object[]> protocolAndAvailableFeatureTypes(Method method)
method
- The test method about to be invoked.protected Document extractBodyAsDocument(com.sun.jersey.api.client.ClientResponse rsp, ProtocolBinding binding)
rsp
- A ClientResponse representing an HTTP response message.binding
- The protocol binding used in the request.null
if
it could not be parsed.Copyright © 2013. All Rights Reserved.