Package org.opengis.cite.iso19142.querymgmt

# Class CreateStoredQueryTests

java.lang.Object
org.opengis.cite.iso19142.BaseFixture
org.opengis.cite.iso19142.querymgmt.CreateStoredQueryTests

public class CreateStoredQueryTests extends BaseFixture
Provides test methods that verify the creation of stored queries. A conforming implementation must support the query language "urn:ogc:def:queryLanguage:OGC-WFS::WFSQueryExpression". Other query languages may be listed in the capabilities document in the context of the `CreateStoredQuery` request.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `QRY_GET_FEATURE_BY_NAME`
  `static final String`
  `QRY_GET_FEATURE_BY_TYPE`
  `static final String`
  `QRY_INVALID_LANG`

  ### Fields inherited from class org.opengis.cite.iso19142.BaseFixture

  `docBuilder, ETS_PKG, featureInfo, featureTypes, reqEntity, rspEntity, supportedBindings, TNS_PREFIX, wfsClient, wfsMetadata, wfsVersion`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CreateStoredQueryTests()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `createGetFeatureByTypeName()`
  [`Test`] Submits a `CreateStoredQuery` request to retrieve features by type name.
  `void`
  `createStoredQueryWithUnsupportedQueryLanguage()`
  [`Test`] Submits a `CreateStoredQuery` request that contains a query expressed in an unsupported query language.
  `void`
  `deleteQueriesAtEnd()`
  This configuration method drops any stored queries that may have been created by a test method.
  `void`
  `deleteQueriesAtStart()`
  This configuration method deletes specific stored queries that may already be known to the IUT; specifically: "urn:example:wfs2-query:GetFeatureByTypeName" "urn:example:wfs2-query:GetFeatureByName" "urn:example:wfs2-query:InvalidLang" The remaining tests are skipped if this fails because a precondition cannot be met.
  `void`
  `duplicateQuery()`
  [`Test`] Submits a `CreateStoredQuery` request containing a query definition that is identical to an existing one.
  `void`
  `initQueryFilterFixture(org.testng.ITestContext testContext)`

  ### Methods inherited from class org.opengis.cite.iso19142.BaseFixture

  `addAttributesOnTestFailure, allProtocolsAndFeatureTypes, bindingAndAvailFeatureTypeProductSet, extractBodyAsDocument, getFeatureTypes, getInstantiatedFeatureTypes, getProtocolBindings, initBaseFixture, initParser, setWfsClient`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### QRY_GET_FEATURE_BY_TYPE

    public static final String QRY_GET_FEATURE_BY_TYPE
    See Also:
      - Constant Field Values

  - ### QRY_GET_FEATURE_BY_NAME

    public static final String QRY_GET_FEATURE_BY_NAME
    See Also:
      - Constant Field Values

  - ### QRY_INVALID_LANG

    public static final String QRY_INVALID_LANG
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### CreateStoredQueryTests

    public CreateStoredQueryTests()

- ## Method Details

  - ### initQueryFilterFixture

    @BeforeClass public void initQueryFilterFixture(org.testng.ITestContext testContext)

  - ### deleteQueriesAtStart

    @BeforeClass public void deleteQueriesAtStart()
    This configuration method deletes specific stored queries that may already be known to the IUT; specifically:
    - "urn:example:wfs2-query:GetFeatureByTypeName"
    - "urn:example:wfs2-query:GetFeatureByName"
    - "urn:example:wfs2-query:InvalidLang"
    The remaining tests are skipped if this fails because a precondition cannot be met.

  - ### deleteQueriesAtEnd

    @AfterClass public void deleteQueriesAtEnd()
    This configuration method drops any stored queries that may have been created by a test method. If an error occurs a WARNING message is logged.

  - ### createGetFeatureByTypeName

    public void createGetFeatureByTypeName()
    [`Test`] Submits a `CreateStoredQuery` request to retrieve features by type name. The query identifier is "urn:example:wfs2-query:GetFeatureByTypeName". The response is expected to contain an XML entity with "CreateStoredQueryResponse" as the document element. The query is then invoked for all feature types for which data exist.

  - ### createStoredQueryWithUnsupportedQueryLanguage

    public void createStoredQueryWithUnsupportedQueryLanguage()
    [`Test`] Submits a `CreateStoredQuery` request that contains a query expressed in an unsupported query language. An exception report is expected in response containing the error code "InvalidParameterValue".

  - ### duplicateQuery

    public void duplicateQuery()
    [`Test`] Submits a `CreateStoredQuery` request containing a query definition that is identical to an existing one. An exception report is expected in response containing the error code "DuplicateStoredQueryIdValue".