public class Feature extends CommonDataFixture
A.2.8. Feature
Author:
Lyn Goltz
  • Field Details

    • DUMMY_COLLECTION_ID

      public static final String DUMMY_COLLECTION_ID
      Constant DUMMY_COLLECTION_ID="dUmmYColLection"
      See Also:
  • Constructor Details

    • Feature

      public Feature()
  • Method Details

    • collectionFeatureId

      @DataProvider(name="collectionFeatureId") public Iterator<Object[]> collectionFeatureId(org.testng.ITestContext testContext)

      collectionFeatureId.

      Parameters:
      testContext - a ITestContext object
      Returns:
      a Iterator object
    • retrieveRequiredInformationFromTestContext

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

      retrieveRequiredInformationFromTestContext.

      Parameters:
      testContext - a ITestContext object
    • featureOperation

      public void featureOperation(Map<String,Object> collection, String featureId)
       Abstract Test 27: /ats/core/f-op
       Test Purpose: Validate that a feature can be retrieved from the expected location.
       Requirement: /req/core/f-op
      
       Test Method
        1. For a sufficiently large subset of all features in a feature collection (path /collections/{collectionId}), issue an HTTP GET request to the URL /collections/{collectionId}/items/{featureId} where {collectionId} is the id property for the collection and {featureId} is the id property of the feature.
        2. Validate that a feature was returned with a status code 200
        3. Validate the contents of the returned feature using test /ats/core/f-success.
       
      Parameters:
      collection - the collection under test, never null
      featureId - the featureId to request, may be null (test will be skipped)
    • validateFeatureResponse

      public void validateFeatureResponse(Map<String,Object> collection, String featureId)
       Abstract Test 28: /ats/core/f-success
       Test Purpose: Validate that the Feature complies with the required structure and contents.
       Requirement: /req/core/f-success
      
       Test Method
        1. Validate that the Feature includes all required link properties using /ats/core/f-links
        2. Validate the Feature for all supported media types using the resources and tests identified in Schema and Tests for Features
       
       Abstract Test 29: /ats/core/f-links
       Test Purpose: Validate that the required links are included in a Feature.
       Requirement: /req/core/f-links
      
       Test Method:
       Verify that the returned Feature 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).
        3. a link to the feature collection that contains this feature (relation: collection).
       Verify that all links include the rel and type link parameters.
       
      Parameters:
      collection - the collection under test, never null
      featureId - the featureId to request, may be null (test will be skipped)