Package org.opengis.cite.kml22
Class BaseFixture
java.lang.Object
org.opengis.cite.kml22.BaseFixture
- Direct Known Subclasses:
FeatureTests,KmlDocumentTests,LinkTests,Options,Recommendations,SpatialTests,StyleRecommendations,StyleTests,TemporalElementTests,UserDefinedDataTests,ViewTests
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidobtainTestSubject(org.testng.ITestContext testContext) Obtains the test subject from the ISuite test context.voidsetTestSubject(Document testSubject) Sets the test subject (intended only to facilitate unit testing).protected voidverifyElementNotEmpty(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.
-
Field Details
-
NS_MAP
An immutable Map containing a KML namespace binding where the prefix is "kml" -
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 attributeSuiteAttribute.TEST_SUBJECTshould evaluate to a DOM Document node.- Parameters:
testContext- The test (group) context.
-
setTestSubject
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.
-