Class DataFixture
java.lang.Object
org.opengis.cite.sensorml20.level1.DataFixture
- Direct Known Subclasses:
SchematronTests
A supporting base class that provides a common fixture for validating data sets. The
configuration methods are invoked before any that may be defined in a subclass.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGenerates an XPath expression to find all instances of the given elements in the data being validated.void
initDataFixture
(org.testng.ITestContext testContext) A configuration method (BeforeClass
) that initializes the test fixturevoid
setDataFile
(File dataFile) Sets the data file.void
setSchemaModel
(org.apache.xerces.xs.XSModel xsModel) Sets the schema model (for unit testing purposes).
-
Field Details
-
dataFile
A File containing GML data. -
model
protected org.apache.xerces.xs.XSModel modelAn XSModel object representing a GML application schema.
-
-
Constructor Details
-
DataFixture
public DataFixture()Constructor for DataFixture.
-
-
Method Details
-
initDataFixture
@BeforeClass(alwaysRun=true) public void initDataFixture(org.testng.ITestContext testContext) A configuration method (BeforeClass
) that initializes the test fixture- Parameters:
testContext
- The test (group) context.
-
setDataFile
Sets the data file. This is a convenience method intended to facilitate unit testing.- Parameters:
dataFile
- A File containing the data to be validated.
-
setSchemaModel
public void setSchemaModel(org.apache.xerces.xs.XSModel xsModel) Sets the schema model (for unit testing purposes).- Parameters:
xsModel
- An XSModel object representing a GML application schema.
-
generateXPathExpression
Generates an XPath expression to find all instances of the given elements in the data being validated. The supplied namespace bindings will be supplemented if necessary.- Parameters:
elemNames
- A list of qualified names corresponding to element declarations.namespaceBindings
- A collection of namespace bindings required to evaluate the XPath expression, where each entry maps a namespace URI (key) to a prefix (value).- Returns:
- An XPath (1.0) expression.
-