Class StoredQueryTests

java.lang.Object
org.opengis.cite.iso19142.BaseFixture
org.opengis.cite.iso19142.simple.StoredQueryTests

public class StoredQueryTests extends BaseFixture
Tests the service response to a GetFeature request that invokes a stored query. A WFS implementation is required to support stored queries at this conformance level.

Sources

  • ISO 19142:2010, cl. A.1.1: Simple WFS
  • ISO 19142:2010, cl. 11: GetFeature operation
  • ISO 19142:2010, cl. 7.9.3: Stored query expression
  • Constructor Details

    • StoredQueryTests

      public StoredQueryTests()
  • Method Details

    • initClassFixture

      @BeforeClass public void initClassFixture(org.testng.ITestContext testContext)
      Initializes the test class fixture. The (pre-compiled) WFS schema is retrieved from the test run context.
      Parameters:
      testContext - The test run context.
    • buildGetFeatureRequestEntity

      @BeforeMethod public void buildGetFeatureRequestEntity()
      Builds a DOM Document representing a GetFeature request entity that contains no query expressions.
    • unknownStoredQuery

      public void unknownStoredQuery(ProtocolBinding binding)
      [Test] If no stored query matches the given identifier then an exception report with exception code "InvalidParameterValue" is expected.
      Parameters:
      binding - The ProtocolBinding to use.
      See Also:
      • "ISO 19142:2010, cl. 7.9.3.4: Stored query identifier"
    • invokeGetFeatureByIdWithUnknownID

      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.
      Parameters:
      binding - The ProtocolBinding to use.
      See Also:
      • "OGC 09-026r2, cl. 11.3.5: GetFeatureById response"
      • "OGC 09-026r1, cl. 7.9.3.6: GetFeatureById stored query"
    • invokeGetFeatureById

      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.
      Parameters:
      binding - The ProtocolBinding to use.
      See Also:
      • "ISO 19142:2010, cl. 7.9.3.6: GetFeatureById stored query"