Class Capability2Tests

java.lang.Object
org.opengis.cite.sta10.createUpdateDelete.Capability2Tests

public class Capability2Tests extends Object
Includes various tests of "A.3 Create Update Delete" Conformance class.
  • Field Details

    • rootUri

      public String rootUri
      The root URL of the SensorThings service under the test
  • Constructor Details

    • Capability2Tests

      public Capability2Tests()
  • Method Details

    • obtainTestSubject

      @BeforeClass public void obtainTestSubject(org.testng.ITestContext testContext)
      This method will be run before starting the test for this conformance class. It cleans the database to start test.
      Parameters:
      testContext - The test context to find out whether this class is requested to test or not
    • createEntities

      public void createEntities()
      This method is testing create or POST entities. It only tests simple create, no deep insert. It makes sure that the response is 201 and use simple GET to make sure the entity is added to the service.
    • createEntitiesWithDeepInsert

      public void createEntitiesWithDeepInsert()
      This method is testing create or POST in the form of Deep Insert. It makes sure the response is 201. Also using GET requests, it makes sure the entity and all its related entities are created and added to the service.
    • createInvalidEntitiesWithDeepInsert

      public void createInvalidEntitiesWithDeepInsert()
      This method is testing create or POST with invalid Deep Insert. It makes sure that if there is any problem in the request body of Deep Insert, none of the entities in that query is created. The response should be 400 or 409 and the entities should not be accessible using GET.
    • createInvalidEntities

      public void createInvalidEntities()
      This method is testing create or POST invalid entities. The response should be 400 or 409 and the entity should not be accessible using GET.
    • patchEntities

      public void patchEntities()
      This method is testing partial update or PATCH. The response should be 200 and only the properties in the PATCH body should be updated, and the rest must be unchanged.
    • deleteEntities

      public void deleteEntities()
      This method is testing DELETE and its integrity constraint. The response should be 200. After DELETE the GET request to that entity should return 404.
    • invalidPatchEntities

      public void invalidPatchEntities()
      This method is testing invalid partial update or PATCH. The PATCH request is invalid if the body contains related entities as inline content.
    • deleteNoneexistentEntities

      public void deleteNoneexistentEntities()
      This method is testing DELETE request for a nonexistent entity. The response should be 404.
    • deleteEverythings

      @AfterClass public void deleteEverythings()
      This method is run after all the tests of this class is run and clean the database.