diff --git a/src/main/java/org/opengis/cite/cdb10/CommonFixture.java b/src/main/java/org/opengis/cite/cdb10/CommonFixture.java index 1ab1d18..eb37a12 100644 --- a/src/main/java/org/opengis/cite/cdb10/CommonFixture.java +++ b/src/main/java/org/opengis/cite/cdb10/CommonFixture.java @@ -70,14 +70,6 @@ public void initCommonFixture(ITestContext testContext) { */ @BeforeClass public void obtainTestSubject(ITestContext testContext) { - Object obj = testContext.getSuite().getAttribute( - SuiteAttribute.LEVEL.getName()); - if ((null != obj)) { - Integer level = Integer.class.cast(obj); -// Assert.assertTrue(level.intValue() > 0, -// "Conformance level 1 will not be checked since ics = " + level); - } - path = testContext.getSuite().getAttribute( SuiteAttribute.TEST_SUBJECT.getName()).toString().trim(); diff --git a/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/CDBAttributesXmlStructureTests.java b/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/CDBAttributesXmlStructureTests.java index 74de804..ce5be6a 100644 --- a/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/CDBAttributesXmlStructureTests.java +++ b/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/CDBAttributesXmlStructureTests.java @@ -9,7 +9,7 @@ /** * Created by martin on 2016-09-08. */ -public class CDBAttributesXmlStructureTests extends CommonFixture { +public class CDBAttributesXmlStructureTests extends Capability2Tests { @Test public void verifyCDBAttributesXmlFileExists() { diff --git a/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/Capability2Tests.java b/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/Capability2Tests.java index 0743d38..f3d3952 100644 --- a/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/Capability2Tests.java +++ b/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/Capability2Tests.java @@ -1,7 +1,10 @@ package org.opengis.cite.cdb10.metadataAndVersioning; import org.opengis.cite.cdb10.CommonFixture; +import org.opengis.cite.cdb10.SuiteAttribute; import org.testng.Assert; +import org.testng.ITestContext; +import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; @@ -10,30 +13,21 @@ */ public class Capability2Tests extends CommonFixture { - /** - * Run conformance level 2 tests only if the preconditions are satisfied. - */ - @BeforeTest - public void checkPreconditions() { - Assert.assertTrue(2 > 1, - "Preconditions for Conformance Level 2 were not satisfied."); - } - - /** - * Checks the result of the length function. - */ - @Test(description = "Implements ATC 2-1") - public void checkLength() { - String str = "perihelion"; - Assert.assertEquals(str.length(), 10); - } - /** - * Checks the Unicode code point value of the first character. + * Obtains the test subject from the ISuite context. The suite attribute + * {@link org.opengis.cite.cdb10.SuiteAttribute#TEST_SUBJECT} should + * evaluate to a DOM Document node. + * + * @param testContext The test (group) context. */ - @Test(description = "Implements ATC 2-2") - public void codePoint() { - String str = "perihelion"; - Assert.assertEquals(str.codePointAt(0), 100); + @BeforeClass + public void obtainTestSubject(ITestContext testContext) { + Object obj = testContext.getSuite().getAttribute(SuiteAttribute.LEVEL.getName()); + if ((null != obj)) { + Integer level = Integer.class.cast(obj); + Assert.assertTrue(level > 1, + "Conformance level " + "2 will not be checked since ics = " + level); + } + super.obtainTestSubject(testContext); } } diff --git a/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/ConfigurationXmlStructureTests.java b/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/ConfigurationXmlStructureTests.java index 10ae73f..8bbbc37 100644 --- a/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/ConfigurationXmlStructureTests.java +++ b/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/ConfigurationXmlStructureTests.java @@ -9,7 +9,7 @@ /** * Created by martin on 2016-09-07. */ -public class ConfigurationXmlStructureTests extends CommonFixture { +public class ConfigurationXmlStructureTests extends Capability2Tests { @Test public void verifyConfigurationXmlFileExists() { diff --git a/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/DefaultsXmlStructureTests.java b/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/DefaultsXmlStructureTests.java index 5f13de2..a2c0d63 100644 --- a/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/DefaultsXmlStructureTests.java +++ b/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/DefaultsXmlStructureTests.java @@ -9,7 +9,7 @@ /** * Created by martin on 2016-09-03. */ -public class DefaultsXmlStructureTests extends CommonFixture { +public class DefaultsXmlStructureTests extends Capability2Tests { @Test public void verifyDefaultsXmlFileExists() { new DefaultsXml(path); diff --git a/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/GeomaticsAttributesXmlStructureTests.java b/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/GeomaticsAttributesXmlStructureTests.java index 9298b21..84502ea 100644 --- a/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/GeomaticsAttributesXmlStructureTests.java +++ b/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/GeomaticsAttributesXmlStructureTests.java @@ -9,7 +9,7 @@ /** * Created by martin on 2016-09-10. */ -public class GeomaticsAttributesXmlStructureTests extends CommonFixture { +public class GeomaticsAttributesXmlStructureTests extends Capability2Tests { @Test public void verifyGeomaticsAttributesXmlFileExists() { diff --git a/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/LightsXmlStructureTests.java b/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/LightsXmlStructureTests.java index 347d326..a2fdd9d 100644 --- a/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/LightsXmlStructureTests.java +++ b/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/LightsXmlStructureTests.java @@ -9,7 +9,7 @@ /** * Created by martin on 2016-09-01. */ -public class LightsXmlStructureTests extends CommonFixture { +public class LightsXmlStructureTests extends Capability2Tests { @Test public void verifyLightsXmlFileExists() { diff --git a/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/LightsXxxXmlStructureTests.java b/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/LightsXxxXmlStructureTests.java index 04d3d11..b367915 100644 --- a/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/LightsXxxXmlStructureTests.java +++ b/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/LightsXxxXmlStructureTests.java @@ -20,7 +20,7 @@ /** * Created by martin on 2016-09-12. */ -public class LightsXxxXmlStructureTests extends CommonFixture { +public class LightsXxxXmlStructureTests extends Capability2Tests { private static final List DIRECTIONALITY_VALUES = Arrays.asList("Omnidirectional", "Directional", "Bidirectional"); diff --git a/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/MaterialsXmlStructureTests.java b/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/MaterialsXmlStructureTests.java index 9384df1..f15fc45 100644 --- a/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/MaterialsXmlStructureTests.java +++ b/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/MaterialsXmlStructureTests.java @@ -19,7 +19,7 @@ /** * Created by martin on 2016-09-09. */ -public class MaterialsXmlStructureTests extends CommonFixture { +public class MaterialsXmlStructureTests extends Capability2Tests { @Test public void verifyMaterialsXmlFileExists() { diff --git a/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/ModelComponentsXmlStructureTests.java b/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/ModelComponentsXmlStructureTests.java index 0623adc..28bdd41 100644 --- a/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/ModelComponentsXmlStructureTests.java +++ b/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/ModelComponentsXmlStructureTests.java @@ -9,7 +9,7 @@ /** * Created by martin on 2016-09-02. */ -public class ModelComponentsXmlStructureTests extends CommonFixture { +public class ModelComponentsXmlStructureTests extends Capability2Tests { @Test public void verifyModelComponentsXmlFileExists() { diff --git a/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/VendorAttributesXmlStructureTests.java b/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/VendorAttributesXmlStructureTests.java index caacbee..6b99f27 100644 --- a/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/VendorAttributesXmlStructureTests.java +++ b/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/VendorAttributesXmlStructureTests.java @@ -9,7 +9,7 @@ /** * Created by martin on 2016-09-09. */ -public class VendorAttributesXmlStructureTests extends CommonFixture { +public class VendorAttributesXmlStructureTests extends Capability2Tests { @Test public void verifyVendorAttributesXmlFileExists() { diff --git a/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/VersionXmlStructureTests.java b/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/VersionXmlStructureTests.java index bf589a3..93d57c9 100644 --- a/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/VersionXmlStructureTests.java +++ b/src/main/java/org/opengis/cite/cdb10/metadataAndVersioning/VersionXmlStructureTests.java @@ -9,7 +9,7 @@ /** * Created by martin on 2016-09-06. */ -public class VersionXmlStructureTests extends CommonFixture { +public class VersionXmlStructureTests extends Capability2Tests { @Test public void verifyVersionXmlFileExists() { diff --git a/src/main/scripts/ctl/cdb10-suite.ctl b/src/main/scripts/ctl/cdb10-suite.ctl index 0a6c6f6..8307cb8 100644 --- a/src/main/scripts/ctl/cdb10-suite.ctl +++ b/src/main/scripts/ctl/cdb10-suite.ctl @@ -54,7 +54,7 @@

-