From 0f7debe0583379852b8599de5cbf875097bdf4cb Mon Sep 17 00:00:00 2001 From: Dirk Stenger Date: Fri, 6 Jul 2018 16:42:42 +0200 Subject: [PATCH] Improve method names and descriptions (#8) --- .../collections/GetFeaturesOperation.java | 42 +++++++++---------- .../collections/GetFeaturesOperationIT.java | 20 ++++----- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/main/java/org/opengis/cite/wfs30/collections/GetFeaturesOperation.java b/src/main/java/org/opengis/cite/wfs30/collections/GetFeaturesOperation.java index c49e3468..11e5ad7a 100644 --- a/src/main/java/org/opengis/cite/wfs30/collections/GetFeaturesOperation.java +++ b/src/main/java/org/opengis/cite/wfs30/collections/GetFeaturesOperation.java @@ -170,7 +170,7 @@ public void retrieveRequiredInformationFromTestContext( ITestContext testContext * the collection under test, never null */ @Test(description = "Implements A.4.4.9. Validate the Get Features Operation (Requirement 17, 24)", groups = "getFeaturesBase", dataProvider = "collectionItemUris", dependsOnGroups = "collections") - public void validateGetFeaturesOperation( Map collection ) { + public void validateTheGetFeaturesOperation( Map collection ) { String collectionName = (String) collection.get( "name" ); String getFeaturesUrl = findGetFeatureUrlForGeoJson( collection ); @@ -205,8 +205,8 @@ public void validateGetFeaturesOperation( Map collection ) { * @param collection * the collection under test, never null */ - @Test(description = "Implements A.4.4.10. Validate the Get Features Operation Response (Requirement 25, 26)", groups = "getFeaturesBase", dataProvider = "collectionItemUris", dependsOnMethods = "validateGetFeaturesOperation") - public void validateGetFeaturesOperationResponse_Links( Map collection ) { + @Test(description = "Implements A.4.4.10. Validate the Get Features Operation Response (Requirement 25, 26)", groups = "getFeaturesBase", dataProvider = "collectionItemUris", dependsOnMethods = "validateTheGetFeaturesOperation") + public void validateTheGetFeaturesOperationResponse_Links( Map collection ) { String collectionName = (String) collection.get( "name" ); ResponseData response = collectionNameAndResponse.get( collectionName ); if ( response == null ) @@ -259,8 +259,8 @@ public void validateGetFeaturesOperationResponse_Links( Map coll * @param collection * the collection under test, never null */ - @Test(description = "Implements A.4.4.10. Validate the Get Features Operation Response (Requirement 27)", groups = "getFeaturesBase", dataProvider = "collectionItemUris", dependsOnMethods = "validateGetFeaturesOperation") - public void validateGetFeaturesOperationResponse_property_timeStamp( Map collection ) { + @Test(description = "Implements A.4.4.10. Validate the Get Features Operation Response (Requirement 27)", groups = "getFeaturesBase", dataProvider = "collectionItemUris", dependsOnMethods = "validateTheGetFeaturesOperation") + public void validateTheGetFeaturesOperationResponse_property_timeStamp( Map collection ) { String collectionName = (String) collection.get( "name" ); ResponseData response = collectionNameAndResponse.get( collectionName ); if ( response == null ) @@ -289,7 +289,7 @@ public void validateGetFeaturesOperationResponse_property_timeStamp( Mapnull */ - @Test(description = "Implements A.4.4.10. Validate the Get Features Operation Response (Requirement 29)", groups = "getFeaturesBase", dataProvider = "collectionItemUris", dependsOnMethods = "validateGetFeaturesOperation") + @Test(description = "Implements A.4.4.10. Validate the Get Features Operation Response (Requirement 29)", groups = "getFeaturesBase", dataProvider = "collectionItemUris", dependsOnMethods = "validateTheGetFeaturesOperation") public void validateGetFeaturesOperationResponse_property_numberReturned( Map collection ) { String collectionName = (String) collection.get( "name" ); ResponseData response = collectionNameAndResponse.get( collectionName ); @@ -322,8 +322,8 @@ public void validateGetFeaturesOperationResponse_property_numberReturned( Map collection ) + @Test(description = "Implements A.4.4.10. Validate the Get Features Operation Response (Requirement 28)", groups = "getFeaturesBase", dataProvider = "collectionItemUris", dependsOnMethods = "validateTheGetFeaturesOperation") + public void validateTheGetFeaturesOperationResponse_property_numberMatched( Map collection ) throws URISyntaxException { String collectionName = (String) collection.get( "name" ); ResponseData response = collectionNameAndResponse.get( collectionName ); @@ -367,8 +367,8 @@ public void validateGetFeaturesOperationResponse_property_numberMatched( Mapnull * */ - @Test(description = "Implements A.4.4.11. Limit Parameter (Requirement 18)", dataProvider = "collectionItemUris", dependsOnMethods = "validateGetFeaturesOperation") - public void validateLimitParameter( Map collection ) { + @Test(description = "Implements A.4.4.11. Limit Parameter (Requirement 18)", dataProvider = "collectionItemUris", dependsOnMethods = "validateTheGetFeaturesOperation") + public void limitParameter( Map collection ) { String collectionName = (String) collection.get( "name" ); Parameter limit = findParameterByName( collectionName, "limit" ); @@ -412,8 +412,8 @@ public void validateLimitParameter( Map collection ) { * @throws URISyntaxException * if the creation of a uri fails */ - @Test(description = "Implements A.4.4.11. Limit Parameter (Requirement 19)", dataProvider = "collectionItemUrisWithLimit", dependsOnMethods = "validateGetFeaturesOperation") - public void validateLimitParameter_requests( Map collection, int limit ) + @Test(description = "Implements A.4.4.11. Limit Parameter (Requirement 19)", dataProvider = "collectionItemUrisWithLimit", dependsOnMethods = "validateTheGetFeaturesOperation") + public void limitParameter_requests( Map collection, int limit ) throws URISyntaxException { String collectionName = (String) collection.get( "name" ); @@ -468,8 +468,8 @@ public void validateLimitParameter_requests( Map collection, int * @param collection * the collection under test, never null */ - @Test(description = "Implements A.4.4.12. Bounding Box (Requirement 20)", dataProvider = "collectionItemUris", dependsOnMethods = "validateGetFeaturesOperation") - public void validateBboxParameter( Map collection ) { + @Test(description = "Implements A.4.4.12. Bounding Box Parameter (Requirement 20)", dataProvider = "collectionItemUris", dependsOnMethods = "validateTheGetFeaturesOperation") + public void boundingBoxParameter( Map collection ) { String collectionName = (String) collection.get( "name" ); Parameter bbox = findParameterByName( collectionName, "bbox" ); @@ -517,8 +517,8 @@ public void validateBboxParameter( Map collection ) { * @throws URISyntaxException * if the creation of a uri fails */ - @Test(description = "Implements A.4.4.12. Bounding Box Parameter (Requirement 21)", dataProvider = "collectionItemUrisWithBboxes", dependsOnMethods = "validateGetFeaturesOperation") - public void validateBboxParameter_requests( Map collection, BBox bbox ) + @Test(description = "Implements A.4.4.12. Bounding Box Parameter (Requirement 21)", dataProvider = "collectionItemUrisWithBboxes", dependsOnMethods = "validateTheGetFeaturesOperation") + public void boundingBoxParameter_requests( Map collection, BBox bbox ) throws URISyntaxException { String collectionName = (String) collection.get( "name" ); @@ -568,8 +568,8 @@ public void validateBboxParameter_requests( Map collection, BBox * @param collection * the collection under test, never null */ - @Test(description = "Implements A.4.4.13. Time (Requirement 22)", dataProvider = "collectionItemUris", dependsOnMethods = "validateGetFeaturesOperation") - public void validateTimeParameter( Map collection ) { + @Test(description = "Implements A.4.4.13. Time Parameter (Requirement 22)", dataProvider = "collectionItemUris", dependsOnMethods = "validateTheGetFeaturesOperation") + public void timeParameter( Map collection ) { String collectionName = (String) collection.get( "name" ); Parameter time = findParameterByName( collectionName, "time" ); @@ -617,9 +617,9 @@ public void validateTimeParameter( Map collection ) { * if the creation of a uri fails * */ - @Test(description = "Implements A.4.4.12. Bounding Box Parameter (Requirement 23)", dataProvider = "collectionItemUrisWithTimes", dependsOnMethods = "validateGetFeaturesOperation") - public void validateTimeParameter_requests( Map collection, String queryParameter, Object begin, - Object end ) + @Test(description = "Implements A.4.4.13. Time Parameter (Requirement 23)", dataProvider = "collectionItemUrisWithTimes", dependsOnMethods = "validateTheGetFeaturesOperation") + public void timeParameter_requests( Map collection, String queryParameter, Object begin, + Object end ) throws URISyntaxException { String collectionName = (String) collection.get( "name" ); diff --git a/src/test/java/org/opengis/cite/wfs30/collections/GetFeaturesOperationIT.java b/src/test/java/org/opengis/cite/wfs30/collections/GetFeaturesOperationIT.java index 4de28df4..c00212f3 100644 --- a/src/test/java/org/opengis/cite/wfs30/collections/GetFeaturesOperationIT.java +++ b/src/test/java/org/opengis/cite/wfs30/collections/GetFeaturesOperationIT.java @@ -64,17 +64,17 @@ public void testGetFeatureOperations() for ( Iterator it = collections; it.hasNext(); ) { Object[] collection = it.next(); Map parameter = (Map) collection[0]; - getFeaturesOperation.validateGetFeaturesOperation( parameter ); - getFeaturesOperation.validateGetFeaturesOperationResponse_Links( parameter ); + getFeaturesOperation.validateTheGetFeaturesOperation( parameter ); + getFeaturesOperation.validateTheGetFeaturesOperationResponse_Links( parameter ); // skipped (parameter missing): - // getFeaturesOperation.validateGetFeaturesOperationResponse_property_timeStamp( parameter ); + // getFeaturesOperation.validateTheGetFeaturesOperationResponse_property_timeStamp( parameter ); // skipped (parameter missing): // getFeaturesOperation.validateGetFeaturesOperationResponse_property_numberReturned( parameter ); // skipped (parameter missing): - // getFeaturesOperation.validateGetFeaturesOperationResponse_property_numberMatched( parameter ); - getFeaturesOperation.validateLimitParameter( parameter ); - // fails (schema->items->type missing): getFeaturesOperation.validateBboxParameter(); - // fails (parameter is missing): getFeaturesOperation.validateTimeParameter( parameter ); + // getFeaturesOperation.validateTheGetFeaturesOperationResponse_property_numberMatched( parameter ); + getFeaturesOperation.limitParameter( parameter ); + // fails (schema->items->type missing): getFeaturesOperation.boundingBoxParameter(); + // fails (parameter is missing): getFeaturesOperation.timeParameter( parameter ); } Iterator collectionsWithLimits = getFeaturesOperation.collectionItemUrisWithLimits( testContext ); @@ -83,7 +83,7 @@ public void testGetFeatureOperations() Map parameter = (Map) collection[0]; int limit = (int) collection[1]; // skipped (parameter missing): - getFeaturesOperation.validateLimitParameter_requests( parameter, limit ); + getFeaturesOperation.limitParameter_requests( parameter, limit ); } Iterator collectionsWithBboxes = getFeaturesOperation.collectionItemUrisWithBboxes( testContext ); @@ -92,7 +92,7 @@ public void testGetFeatureOperations() Map parameter = (Map) collection[0]; BBox bbox = (BBox) collection[1]; // fails: in collections.json must the links (rel: item, type: application/geo+json) changed to https - // getFeaturesOperation.validateBboxParameter_requests( parameter, bbox ); + // getFeaturesOperation.boundingBoxParameter_requests( parameter, bbox ); } Iterator collectionsWithTimes = getFeaturesOperation.collectionItemUrisWithTimes( testContext ); @@ -102,7 +102,7 @@ public void testGetFeatureOperations() String queryParam = (String) collection[1]; Object begin = collection[2]; Object end = collection[3]; - getFeaturesOperation.validateTimeParameter_requests( parameter, queryParam, begin, end ); + getFeaturesOperation.timeParameter_requests( parameter, queryParam, begin, end ); } }