public class StoredQueryTests extends BaseFixture
Sources
docBuilder, ETS_PKG, featureInfo, featureTypes, reqEntity, rspEntity, supportedBindings, TNS_PREFIX, wfsClient, wfsMetadata, wfsVersion| Constructor and Description |
|---|
StoredQueryTests() |
| Modifier and Type | Method and Description |
|---|---|
void |
buildGetFeatureRequestEntity()
Builds a DOM Document representing a GetFeature request entity that
contains no query expressions.
|
(package private) NodeList |
executeGetFeatureByType(QName featureType,
ProtocolBinding binding)
Submits a request to execute the
GetFeatureByType stored
query. |
(package private) String |
findFeatureIdentifier(Document wfsMetadata)
Attempts to find a feature identifier by (a) querying the SUT if it
implements the "Basic WFS" conformance class, or (b) invoking the stored
query
GetFeatureByType. |
void |
initClassFixture(String fid,
ITestContext testContext)
Initializes the test class fixture.
|
void |
invokeGetFeatureById(ProtocolBinding binding)
[
Test] Invoking the GetFeatureById query with a known
feature identifier shall produce the matching feature representation
(@gml:id) as the response entity. |
void |
invokeGetFeatureByIdWithUnknownID(ProtocolBinding binding)
[
Test] Invoking the GetFeatureById query with an
id parameter value that does not match any feature should produce
an error response with status code 404 (Not Found). |
void |
unknownStoredQuery(ProtocolBinding binding)
[
Test] If no stored query matches the given identifier then an
exception report with exception code "InvalidParameterValue" is expected. |
addAttributesOnTestFailure, allProtocolsAndFeatureTypes, bindingAndAvailFeatureTypeProductSet, extractBodyAsDocument, getFeatureTypes, getInstantiatedFeatureTypes, getProtocolBindings, initBaseFixture, initParser, setWfsClientpublic void initClassFixture(String fid, ITestContext testContext)
fid - A String that identifies an available feature instance (gml:id
attribute).testContext - The test run context.public void buildGetFeatureRequestEntity()
public void unknownStoredQuery(ProtocolBinding binding)
Test] If no stored query matches the given identifier then an
exception report with exception code "InvalidParameterValue" is expected.binding - The ProtocolBinding to use.public void invokeGetFeatureByIdWithUnknownID(ProtocolBinding binding)
Test] Invoking the GetFeatureById query with an
id parameter value that does not match any feature should produce
an error response with status code 404 (Not Found). The corresponding OGC
exception code in the response entity, if present, must be "NotFound".
In the WFS 2.0.0 specification, clause 11.4 stipulates that "In the event
that a web feature service encounters an error processing a GetFeature
request, it shall raise an OperationProcessingFailed exception as
described in 7.5." In Table D.2 this exception code is mapped to status
code 403 for some reason.binding - The ProtocolBinding to use.public void invokeGetFeatureById(ProtocolBinding binding)
Test] Invoking the GetFeatureById query with a known
feature identifier shall produce the matching feature representation
(@gml:id) as the response entity. If there is no matching feature, an
error response with a status code 404 (Not Found) is expected.binding - The ProtocolBinding to use.String findFeatureIdentifier(Document wfsMetadata)
GetFeatureByType.wfsMetadata - A WFS capabilities document (wfs:WFS_Capabilities).NodeList executeGetFeatureByType(QName featureType, ProtocolBinding binding)
GetFeatureByType stored
query.featureType - A QName specifying the feature type name.binding - The ProtocolBinding to use (if null any supported
request message binding will be used).Copyright © 2016 Open Geospatial Consortium. All rights reserved.