Class BaseFixture

java.lang.Object
org.opengis.cite.kml22.BaseFixture
Direct Known Subclasses:
FeatureTests, KmlDocumentTests, LinkTests, Options, Recommendations, SpatialTests, StyleRecommendations, StyleTests, TemporalElementTests, UserDefinedDataTests, ViewTests

public class BaseFixture extends Object
A supporting base class that provides some common configuration methods. The configuration methods are invoked before any that may be defined in a subclass.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final Map<String,String>
    An immutable Map containing a KML namespace binding where the prefix is "kml"
    protected Document
    A DOM Document representing the main KML document
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    obtainTestSubject(org.testng.ITestContext testContext)
    Obtains the test subject from the ISuite test context.
    void
    setTestSubject(Document testSubject)
    Sets the test subject (intended only to facilitate unit testing).
    protected void
    verifyElementNotEmpty(String localName, org.opengis.cite.validation.ValidationErrorHandler errHandler)
    Checks that the KML element with the specified local name has one or more child KML elements if it is not a descendant of kml:Update.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • NS_MAP

      protected static final Map<String,String> NS_MAP
      An immutable Map containing a KML namespace binding where the prefix is "kml"
    • testSubject

      protected Document testSubject
      A DOM Document representing the main KML document
  • Constructor Details

    • BaseFixture

      public BaseFixture()
  • Method Details

    • obtainTestSubject

      @BeforeClass(alwaysRun=true) public void obtainTestSubject(org.testng.ITestContext testContext)
      Obtains the test subject from the ISuite test context. The suite attribute SuiteAttribute.TEST_SUBJECT should evaluate to a DOM Document node.
      Parameters:
      testContext - The test (group) context.
    • setTestSubject

      public void setTestSubject(Document testSubject)
      Sets the test subject (intended only to facilitate unit testing).
      Parameters:
      testSubject - A Document node representing the test subject.
    • verifyElementNotEmpty

      protected void verifyElementNotEmpty(String localName, org.opengis.cite.validation.ValidationErrorHandler errHandler)
      Checks that the KML element with the specified local name has one or more child KML elements if it is not a descendant of kml:Update. Extension elements in some foreign namespace are ignored.
      Parameters:
      localName - The name of an element in the namespace "http://www.opengis.net/kml/2.2".
      errHandler - The error handler that collects all detected constraint violations.