Skip to content

Commit

Permalink
Now using Tiles API ETS as a template. This works!
Browse files Browse the repository at this point in the history
  • Loading branch information
ghobona committed Nov 19, 2020
1 parent d4ee537 commit 16a9a74
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import io.restassured.response.Response;

/**
* Updated at the OGC API - Tiles Sprint 2020 by ghobona
*
* A.?.?. Conformance Path {root}/conformance
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import io.restassured.response.Response;

/**
* Updated at the OGC API - Tiles Sprint 2020 by ghobona
*
* A.2.2. Landing Page {root}/
*
Expand All @@ -39,7 +38,7 @@ public class LandingPage extends CommonFixture {
* 3. Validate the contents of the returned document using test /ats/core/root-success.
* </pre>
*/
@Test(description = "Implements Requirement 34 of OGC API - Tiles", groups = "landingpage")
@Test(description = "Implements Requirement TBA", groups = "landingpage")
public void landingPageRetrieval() {
Response request = init().baseUri( rootUri.toString() ).accept( JSON ).when().request( GET, "/" );
request.then().statusCode( 200 );
Expand All @@ -48,21 +47,19 @@ public void landingPageRetrieval() {

/**
* <pre>
* Requirement 12
* If the API has mechanism to expose root resources (e.g. a landing page), the API SHALL advertise a URI to retrieve tile definitions defined by this service as links
* to the descriptions paths with rel: tiles.
* Requirement TBA
* </pre>
*/
@Test(description = "Implements Requirement 12 of OGC API - Tiles: Landing Page {root}/, Requirement 12 (Requirement /req/tiles/root/root-success)", groups = "landingpage")
public void tilesLandingPageValidation() {
@Test(description = "Implements Requirement TBA: Landing Page ", groups = "landingpage")
public void landingPageValidation() {

List<Object> links = response.getList( "links" );

Set<String> linkTypes = collectLinkTypes( links );

boolean expectedLinkTypesExists = linkTypes.contains( "tiles" );
boolean expectedLinkTypesExists = linkTypes.contains( "processes" );
assertTrue( expectedLinkTypesExists,
"The landing page must include at least links with relation type 'tiles', but contains "
"The landing page must include at least links with relation type 'processes', but contains "
+ String.join( ", ", linkTypes ) );


Expand Down
23 changes: 23 additions & 0 deletions src/main/resources/org/opengis/cite/ogcapiprocesses10/testng.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="ogcapi-tiles-1.0-${version}" verbose="0" configfailurepolicy="continue">
<parameter name="iut" value="" />
<parameter name="ics" value="" />

<listeners>
<listener class-name="org.opengis.cite.ogcapiprocesses10.TestRunListener" />
<listener class-name="org.opengis.cite.ogcapiprocesses10.SuiteFixtureListener" />
<listener class-name="org.opengis.cite.ogcapiprocesses10.TestFailureListener" />
</listeners>

<test name="Core">
<packages>
<package name="org.opengis.cite.ogcapiprocesses10.landingpage" />
<package name="org.opengis.cite.ogcapiprocesses10.conformance" />
</packages>
<classes>
<class name="org.opengis.cite.ogcapiprocesses10.SuitePreconditions" />
</classes>
</test>

</suite>
24 changes: 0 additions & 24 deletions src/main/resources/org/opengis/cite/ogcapitiles10/testng.xml

This file was deleted.

6 changes: 3 additions & 3 deletions src/main/scripts/ctl/ogcapi-processes-1.0-suite.ctl
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@
border-width: medium; padding:4px">Implementation under test
</legend>
<p>
<label for="ogc-api-tiles-uri">
<label for="ogc-api-processes-uri">
<h4 style="margin-bottom: 0.5em">Location of the landing page</h4>
</label>
<input id="ogc-api-tiles-uri" name="ogc-api-tiles-uri" size="128" type="text"
<input id="ogc-api-processes-uri" name="ogc-api-processes-uri" size="128" type="text"
value="" />
</p>
<p>
Expand Down Expand Up @@ -79,7 +79,7 @@
<xsl:variable name="test-run-props">
<properties version="1.0">
<entry key="iut">
<xsl:value-of select="normalize-space($form-data/values/value[@key='ogc-api-tiles-uri'])" />
<xsl:value-of select="normalize-space($form-data/values/value[@key='ogc-api-processes-uri'])" />
</entry>
<entry key="noofcollections">
<xsl:choose>
Expand Down

0 comments on commit 16a9a74

Please sign in to comment.