Skip to content

Commit

Permalink
Merge pull request #136 from opengeospatial/issue#132
Browse files Browse the repository at this point in the history
Updated test with latest standard version and error message.
  • Loading branch information
dstenger authored Mar 2, 2021
2 parents 810b8ee + 9ffa334 commit 1619aaf
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,12 @@ public void validateFeatureCollectionsMetadataOperation( TestPoint testPoint ) {
*
* Test Method
* 1. Validate that all response documents comply with /ats/core/fc-md-links
* 2. Validate that all response documents comply with /ats/core/fc-md-items
* 3. In case the response includes a "crs" property, validate that the first value is either "http://www.opengis.net/def/crs/OGC/1.3/CRS84" or "http://www.opengis.net/def/crs/OGC/0/CRS84h"
* 4. Validate the collections content for all supported media types using the resources and tests identified in Schema and Tests for Collections content
* </pre>
*
* @param testPoint
* the test point to test, never <code>null</code>
*/
@Test(description = "A.2.5. Feature Collections {root}/collections, Abstract Test 10, Test Method 1 (Requirement /req/core/fc-md-success)", groups = "collections", dataProvider = "collectionsUris", dependsOnMethods = "validateFeatureCollectionsMetadataOperation", alwaysRun = true)
@Test(description = "A.2.5. Feature Collections {root}/collections, Abstract Test 10, Test Method 1 (Requirement /req/core/fc-md-success, /req/core/crs84)", groups = "collections", dataProvider = "collectionsUris", dependsOnMethods = "validateFeatureCollectionsMetadataOperation", alwaysRun = true)
public void validateFeatureCollectionsMetadataOperationResponse_Links( TestPoint testPoint ) {
Response response = testPointAndResponses.get( testPoint );
if ( response == null )
Expand Down Expand Up @@ -158,7 +155,7 @@ public void validateFeatureCollectionsMetadataOperationResponse_Links( TestPoint
* @param testPoint
* the test point to test, never <code>null</code>
*/
@Test(description = "A.2.5. Feature Collections {root}/collections, Abstract Test 10, Test Method 2 (Requirement /req/core/fc-md-success)", groups = "collections", dataProvider = "collectionsUris", dependsOnMethods = "validateFeatureCollectionsMetadataOperation", alwaysRun = true)
@Test(description = "A.2.5. Feature Collections {root}/collections, Abstract Test 10, Test Method 2 (Requirement /req/core/fc-md-success, /req/core/crs84)", groups = "collections", dataProvider = "collectionsUris", dependsOnMethods = "validateFeatureCollectionsMetadataOperation", alwaysRun = true)
public void validateFeatureCollectionsMetadataOperationResponse_Items( TestPoint testPoint ) {
Response response = testPointAndResponses.get( testPoint );
if ( response == null )
Expand Down Expand Up @@ -186,7 +183,7 @@ public void validateFeatureCollectionsMetadataOperationResponse_Items( TestPoint
* @param testPoint
* the test point to test, never <code>null</code>
*/
@Test(description = "A.2.5. Feature Collections {root}/collections, Abstract Test 10, Test Method 3 (Requirement /req/core/fc-md-success)", groups = "collections", dataProvider = "collectionsUris", dependsOnMethods = "validateFeatureCollectionsMetadataOperation", alwaysRun = true)
@Test(description = "A.2.5. Feature Collections {root}/collections, Abstract Test 10, Test Method 3 (Requirement /req/core/fc-md-success, /req/core/crs84)", groups = "collections", dataProvider = "collectionsUris", dependsOnMethods = "validateFeatureCollectionsMetadataOperation", alwaysRun = true)
public void validateFeatureCollectionsMetadataOperationResponse_CrsProperty( TestPoint testPoint ) {
Response response = testPointAndResponses.get( testPoint );
if ( response == null )
Expand All @@ -210,7 +207,7 @@ public void validateFeatureCollectionsMetadataOperationResponse_CrsProperty( Tes
* @param testPoint
* the test point to test, never <code>null</code>
*/
@Test(description = "A.2.5. Feature Collections {root}/collections, Abstract Test 10, Test Method 4 (Requirement /req/core/fc-md-success)", groups = "collections", dataProvider = "collectionsUris", dependsOnMethods = "validateFeatureCollectionsMetadataOperation", alwaysRun = true)
@Test(description = "A.2.5. Feature Collections {root}/collections, Abstract Test 10, Test Method 4 (Requirement /req/core/fc-md-success, /req/core/crs84)", groups = "collections", dataProvider = "collectionsUris", dependsOnMethods = "validateFeatureCollectionsMetadataOperation", alwaysRun = true)
public void validateFeatureCollectionsMetadataOperationResponse_Content( TestPoint testPoint ) {
Response response = testPointAndResponses.get( testPoint );
if ( response == null )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public void validateFeaturesResponse_NumberMatched( Map<String, Object> collecti
* @param collection
* the collection under test, never <code>null</code>
*/
@Test(description = "Implements A.2.7. Features {root}/collections/{collectionId}/items, Abstract Test 22, Test Method 5 (Requirement /req/core/fc-response) - Abstract Test 24 (Requirement /req/core/fc-timeStamp)", dataProvider = "collectionItemUris", dependsOnMethods = "validateFeaturesOperation", alwaysRun = true)
@Test(description = "Implements A.2.7. Features {root}/collections/{collectionId}/items, Abstract Test 22, Test Method 7 (Requirement /req/core/fc-response) - Abstract Test 26 (Requirement /req/core/fc-numberReturned)", dataProvider = "collectionItemUris", dependsOnMethods = "validateFeaturesOperation", alwaysRun = true)
public void validateFeaturesResponse_NumberReturned( Map<String, Object> collection ) {
String collectionId = (String) collection.get( "id" );
validateNumberReturned( asKey( collectionId ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ public void validateFeaturesWithBoundingBoxResponse_NumberMatched( Map<String, O
* @param bbox
* bbox parameter to request, never <code>null</code>
*/
@Test(description = "Implements A.2.7. Features {root}/collections/{collectionId}/items - BoundingBox, Abstract Test 22, Test Method 5 (Requirement /req/core/fc-response) - Abstract Test 24 (Requirement /req/core/fc-timeStamp)", dataProvider = "collectionItemUrisWithBboxes", dependsOnMethods = "validateFeaturesWithBoundingBoxOperation", alwaysRun = true)
@Test(description = "Implements A.2.7. Features {root}/collections/{collectionId}/items - BoundingBox, Abstract Test 22, Test Method 7 (Requirement /req/core/fc-response) - Abstract Test 26 (Requirement /req/core/fc-numberReturned)", dataProvider = "collectionItemUrisWithBboxes", dependsOnMethods = "validateFeaturesWithBoundingBoxOperation", alwaysRun = true)
public void validateFeaturesResponse_NumberReturned( Map<String, Object> collection, BBox bbox ) {
String collectionId = (String) collection.get( "id" );
validateNumberReturned( asKey( collectionId, bbox ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ public void validateFeaturesWithLimitResponse_NumberMatched( Map<String, Object>
* @param max
* max limit defined by the service, never <code>null</code>
*/
@Test(description = "Implements A.2.7. Features {root}/collections/{collectionId}/items, Limit, Abstract Test 22, Test Method 5 (Requirement /req/core/fc-response) - Abstract Test 24 (Requirement /req/core/fc-timeStamp)", dataProvider = "collectionItemUrisWithLimits", dependsOnMethods = "validateFeaturesWithLimitOperation", alwaysRun = true)
@Test(description = "Implements A.2.7. Features {root}/collections/{collectionId}/items, Limit, Abstract Test 22, Test Method 7 (Requirement /req/core/fc-response) - Abstract Test 26 (Requirement /req/core/fc-numberReturned)", dataProvider = "collectionItemUrisWithLimits", dependsOnMethods = "validateFeaturesWithLimitOperation", alwaysRun = true)
public void validateFeaturesResponse_NumberReturned( Map<String, Object> collection, int limit, int max ) {
String collectionId = (String) collection.get( "id" );
validateNumberReturned( asKey( collectionId, limit ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ public Iterator<Object[]> collectionItemUrisWithDateTimes( ITestContext testCont
* @param testPoint
* the testPoint under test, never <code>null</code>
*/
@Test(description = "A.2.7. Features {root}/collections/{collectionId}/items - Datetime, Abstract Test 14: (Requirement /req/core/fc-time-definition)", dataProvider = "collectionPaths", dependsOnGroups = "featuresBase", alwaysRun = true)
@Test(description = "A.2.7. Features {root}/collections/{collectionId}/items - Datetime, Abstract Test 18: (Requirement /req/core/fc-time-definition)", dataProvider = "collectionPaths", dependsOnGroups = "featuresBase", alwaysRun = true)
public void timeParameterDefinition( TestPoint testPoint ) {
Parameter time = retrieveParameterByName( testPoint.getPath(), getApiModel(), "datetime" );

assertNotNull( time, "Required time parameter for collections with path '" + testPoint.getPath()
assertNotNull( time, "Required datetime parameter for collections with path '" + testPoint.getPath()
+ "' in OpenAPI document is missing" );

String msg = "Expected property '%s' with value '%s' but was '%s'";
Expand Down Expand Up @@ -406,7 +406,7 @@ public void validateFeaturesWithDateTimeResponse_NumberMatched( Map<String, Obje
* a {@link ZonedDateTime} or {@link LocalDate}, the end of the interval, never <code>null</code> if the
* request is an instant
*/
@Test(description = "Implements A.2.7. Features {root}/collections/{collectionId}/items - DateTime, Abstract Test 22, Test Method 5 (Requirement /req/core/fc-response) - Abstract Test 24 (Requirement /req/core/fc-timeStamp)", dataProvider = "collectionItemUrisWithDateTimes", dependsOnMethods = "validateFeaturesWithDateTimeOperation", alwaysRun = true)
@Test(description = "Implements A.2.7. Features {root}/collections/{collectionId}/items - DateTime, Abstract Test 22, Test Method 7 (Requirement /req/core/fc-response) - Abstract Test 26 (Requirement /req/core/fc-numberReturned)", dataProvider = "collectionItemUrisWithDateTimes", dependsOnMethods = "validateFeaturesWithDateTimeOperation", alwaysRun = true)
public void validateFeaturesResponse_NumberReturned( Map<String, Object> collection, String queryParameter,
Object begin, Object end ) {
String collectionId = (String) collection.get( "id" );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void storeRequirementClassesInTestContext( ITestContext testContext ) {
* @param testPoint
* the test point to test, never <code>null</code>
*/
@Test(description = "Implements A.2.4. Conformance Path {root}/conformance, Abstract Test 7 + 8 (Requirements /req/core/conformance-op) and /req/core/conformance-op", groups = "conformance", dataProvider = "conformanceUris", dependsOnGroups = "apidefinition")
@Test(description = "Implements A.2.4. Conformance Path {root}/conformance, Abstract Test 7 + 8 (Requirements /req/core/conformance-op) and /req/core/conformance-success", groups = "conformance", dataProvider = "conformanceUris", dependsOnGroups = "apidefinition")
public void validateConformanceOperationAndResponse( TestPoint testPoint ) {
String testPointUri = new UriBuilder( testPoint ).buildUrl();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class GeneralHttp extends CommonFixture {
* their HTTP 1.1 protocol. (untested)
* </pre>
*/
@Test(description = "Implements A.2.1.1. HTTP (Requirement /req/core/http)")
@Test(description = "Implements A.2.1.1. HTTP, Abstract Test 1 (Requirement /req/core/http)")
public void http() {
Response response = init().baseUri( rootUri.toString() ).when().request( GET, "/" );
response.then().statusLine( containsString( "HTTP/1.1" ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ public void landingPageRetrieval() {

/**
* <pre>
* Abstract Test 4: /ats/core/root-success Test Purpose: Validate that the landing page complies with the require
* structure and contents. Requirement: /req/core/root-success
* Abstract Test 4: /ats/core/root-success
* Test Purpose: Validate that the landing page complies with the require structure and contents.
* Requirement: /req/core/root-success
*
* Test Method: Validate the landing page for all supported media types using the resources and tests identified in
* Schema and Tests for Landing Pages. For formats that require manual inspection, perform the following: a)
Expand Down

0 comments on commit 1619aaf

Please sign in to comment.