public class FeaturesBBox extends AbstractFeatures
AbstractFeatures.CollectionResponseKey, AbstractFeatures.ResponseData
collectionIdAndResponse, collections, iut
noOfCollections
requestLoggingFilter, responseLoggingFilter, rootUri
Constructor and Description |
---|
FeaturesBBox() |
Modifier and Type | Method and Description |
---|---|
void |
boundingBoxParameterDefinition(TestPoint testPoint)
Abstract Test 14: /ats/core/fc-bbox-definition
Test Purpose: Validate that the bounding box query parameters are constructed correctly.
|
Iterator<Object[]> |
collectionItemUrisWithBboxes(org.testng.ITestContext testContext) |
void |
validateFeaturesResponse_GeometryInCRS84(Map<String,Object> collection,
BBox bbox)
Abstract Test 2, Test Method 1
|
void |
validateFeaturesResponse_NumberReturned(Map<String,Object> collection,
BBox bbox)
Abstract Test 22, Test Method 7 (Abstract Test 26)
|
void |
validateFeaturesWithBoundingBoxOperation(Map<String,Object> collection,
BBox bbox)
Abstract Test 13: /ats/core/fc-op
Test Purpose: Validate that features can be identified and extracted from a Collection using query parameters.
|
void |
validateFeaturesWithBoundingBoxResponse_FeaturesProperty(Map<String,Object> collection,
BBox bbox)
Abstract Test 22, Test Method 2
|
void |
validateFeaturesWithBoundingBoxResponse_Links(Map<String,Object> collection,
BBox bbox)
Abstract Test 22, Test Method 4 (Abstract Test 23)
|
void |
validateFeaturesWithBoundingBoxResponse_NumberMatched(Map<String,Object> collection,
BBox bbox)
Abstract Test 22, Test Method 6 (Abstract Test 25)
|
void |
validateFeaturesWithBoundingBoxResponse_TimeStamp(Map<String,Object> collection,
BBox bbox)
Abstract Test 22, Test Method 5 (Abstract Test 24)
|
void |
validateFeaturesWithBoundingBoxResponse_TypeProperty(Map<String,Object> collection,
BBox bbox)
Abstract Test 22, Test Method 1
|
void |
validateFeaturesWithBoundingBoxResponse(Map<String,Object> collection,
BBox bbox)
Abstract Test 15: /ats/core/fc-bbox-response
Test Purpose: Validate that the bounding box query parameters are processed correctly.
|
collectionPaths, isExplode, isRequired, retrieveRequiredInformationFromTestContext, validateFeaturesProperty, validateGeometriesInBBox, validateGeometriesInCrs84, validateLinks, validateNumberMatched, validateNumberReturned, validateTimeStamp, validateTypeProperty
createListOfMediaTypesToSupportForFeatureCollectionsAndFeatures, createListOfMediaTypesToSupportForFeatureCollectionsAndFeatures, createListOfMediaTypesToSupportForOtherResources, getApiModel, noOfCollections, requirementClasses, retrieveApiModel
clearMessages, getRequest, getResponse, init, initCommonFixture
public Iterator<Object[]> collectionItemUrisWithBboxes(org.testng.ITestContext testContext)
public void boundingBoxParameterDefinition(TestPoint testPoint)
Abstract Test 14: /ats/core/fc-bbox-definition Test Purpose: Validate that the bounding box query parameters are constructed correctly. Requirement: /req/core/fc-bbox-definition Test Method: Verify that the bbox query parameter complies with the following definition (using an OpenAPI Specification 3.0 fragment): name: bbox in: query required: false schema: type: array minItems: 4 maxItems: 6 items: type: number style: form explode: false Use a bounding box with four numbers in all requests: * Lower left corner, WGS 84 longitude * Lower left corner, WGS 84 latitude * Upper right corner, WGS 84 longitude * Upper right corner, WGS 84 latitude
testPoint
- the testPoint under test, never null
public void validateFeaturesWithBoundingBoxOperation(Map<String,Object> collection, BBox bbox)
Abstract Test 13: /ats/core/fc-op Test Purpose: Validate that features can be identified and extracted from a Collection using query parameters. Requirement: /req/core/fc-op Test Method 1. For every feature collection identified in Collections, issue an HTTP GET request to the URL /collections/{collectionId}/items where {collectionId} is the id property for a Collection described in the Collections content. 2. Validate that a document was returned with a status code 200. 3. Validate the contents of the returned document using test /ats/core/fc-response. Repeat these tests using the following parameter tests: Bounding Box: * Parameter /ats/core/fc-bbox-definition * Response /ats/core/fc-bbox-response
collection
- the collection under test, never null
bbox
- bbox parameter to request, never null
public void validateFeaturesWithBoundingBoxResponse(Map<String,Object> collection, BBox bbox) throws org.locationtech.jts.io.ParseException
Abstract Test 15: /ats/core/fc-bbox-response Test Purpose: Validate that the bounding box query parameters are processed correctly. Requirement: /req/core/fc-bbox-response Test Method 1. Verify that only features that have a spatial geometry that intersects the bounding box are returned as part of the result set. 2. Verify that the bbox parameter matched all features in the collection that were not associated with a spatial geometry (this is only applicable for datasets that include features without a spatial geometry). 3. Verify that the coordinate reference system of the geometries is WGS 84 longitude/latitude ("http://www.opengis.net/def/crs/OGC/1.3/CRS84" or "http://www.opengis.net/def/crs/OGC/0/CRS84h") since no parameter bbox-crs was specified in the request.
collection
- the collection under test, never null
bbox
- bbox parameter to request, never null
org.locationtech.jts.io.ParseException
- If the JSON cannot be parsedpublic void validateFeaturesResponse_GeometryInCRS84(Map<String,Object> collection, BBox bbox) throws org.locationtech.jts.io.ParseException
Abstract Test 2: /ats/core/crs84 Test Purpose: Validate that all spatial geometries provided through the API are in the CRS84 spatial reference system unless otherwise requested by the client. Requirement: /req/core/crs84 Test Method 1. Do not specify a coordinate reference system in any request. All spatial data should be in the CRS84 reference system. 2. Validate retrieved spatial data using the CRS84 reference system.
collection
- the collection under test, never null
bbox
- bbox parameter to request, never null
org.locationtech.jts.io.ParseException
- if the geometry could not be parsedpublic void validateFeaturesWithBoundingBoxResponse_TypeProperty(Map<String,Object> collection, BBox bbox)
Abstract Test 22: /ats/core/fc-response Test Purpose: Validate that the Feature Collections complies with the require structure and contents. Requirement: /req/core/fc-response Test Method 1. Validate that the type property is present and has a value of FeatureCollection
collection
- the collection under test, never null
bbox
- bbox parameter to request, never null
public void validateFeaturesWithBoundingBoxResponse_FeaturesProperty(Map<String,Object> collection, BBox bbox)
Abstract Test 22: /ats/core/fc-response Test Purpose: Validate that the Feature Collections complies with the require structure and contents. Requirement: /req/core/fc-response Test Method 2. Validate the features property is present and that it is populated with an array of feature items.
collection
- the collection under test, never null
bbox
- bbox parameter to request, never null
public void validateFeaturesWithBoundingBoxResponse_Links(Map<String,Object> collection, BBox bbox)
Abstract Test 22: /ats/core/fc-response Test Purpose: Validate that the Feature Collections complies with the require structure and contents. Requirement: /req/core/fc-response Test Method 4. If the links property is present, validate that all entries comply with /ats/core/fc-links
Abstract Test 23: /ats/core/fc-links Test Purpose: Validate that the required links are included in the Collections document. Requirement: /req/core/fc-links, /req/core/fc-rel-type Test Method: Verify that the response document includes: 1. a link to this response document (relation: self), 2. a link to the response document in every other media type supported by the server (relation: alternate). Verify that all links include the rel and type link parameters.
collection
- the collection under test, never null
bbox
- bbox parameter to request, never null
public void validateFeaturesWithBoundingBoxResponse_TimeStamp(Map<String,Object> collection, BBox bbox)
Abstract Test 22: /ats/core/fc-response Test Purpose: Validate that the Feature Collections complies with the require structure and contents. Requirement: /req/core/fc-response Test Method 5. If the timeStamp property is present, validate that it complies with /ats/core/fc-timeStamp
Abstract Test 24: /ats/core/fc-timeStamp Test Purpose: Validate the timeStamp parameter returned with a Features response Requirement: /req/core/fc-timeStamp Test Method: Validate that the timeStamp value is set to the time when the response was generated.
collection
- the collection under test, never null
bbox
- bbox parameter to request, never null
public void validateFeaturesWithBoundingBoxResponse_NumberMatched(Map<String,Object> collection, BBox bbox) throws URISyntaxException
Abstract Test 22: /ats/core/fc-response Test Purpose: Validate that the Feature Collections complies with the require structure and contents. Requirement: /req/core/fc-response Test Method 6. If the numberMatched property is present, validate that it complies with /ats/core/fc-numberMatched
Abstract Test 25: /ats/core/fc-numberMatched Test Purpose: Validate the numberMatched parameter returned with a Features response Requirement: /req/core/fc-numberMatched Test Method: Validate that the value of the numberMatched parameter is identical to the number of features in the feature collections that match the selection parameters like bbox, datetime or additional filter parameters.
collection
- the collection under test, never null
bbox
- bbox parameter to request, never null
URISyntaxException
- if the creation of a uri failspublic void validateFeaturesResponse_NumberReturned(Map<String,Object> collection, BBox bbox)
Abstract Test 22: /ats/core/fc-response Test Purpose: Validate that the Feature Collections complies with the require structure and contents. Requirement: /req/core/fc-response Test Method 7. If the numberReturned property is present, validate that it complies with /ats/core/fc-numberReturned
Abstract Test 26: /ats/core/fc-numberReturned Test Purpose: Validate the numberReturned parameter returned with a Features response Requirement: /req/core/fc-numberReturned Test Method: Validate that the numberReturned value is identical to the number of features in the response.
collection
- the collection under test, never null
bbox
- bbox parameter to request, never null
Copyright © 2024 Open Geospatial Consortium. All rights reserved.