public class DataFixture extends Object
| Modifier and Type | Field and Description |
|---|---|
protected File |
dataFile
A File containing GML data.
|
protected org.apache.xerces.xs.XSModel |
model
An XSModel object representing a GML application schema.
|
| Constructor and Description |
|---|
DataFixture() |
| Modifier and Type | Method and Description |
|---|---|
String |
generateXPathExpression(List<QName> elemNames,
Map<String,String> namespaceBindings)
Generates 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
fixture as follows:
Obtain the GML data set from the test context. |
void |
setDataFile(File dataFile)
Sets the data file.
|
void |
setSchemaModel(org.apache.xerces.xs.XSModel xsModel)
Sets the schema model (for unit testing purposes).
|
protected File dataFile
protected org.apache.xerces.xs.XSModel model
public void initDataFixture(org.testng.ITestContext testContext)
BeforeClass) that initializes the test
fixture as follows:
SuiteAttribute.GML should evaluate to a
File object containing the GML data. If no such file reference
exists the tests are skipped.model should
evaluate to an XSModel object representing the GML application
schema.testContext - The test (group) context.public void setDataFile(File dataFile)
dataFile - A File containing the data to be validated.public void setSchemaModel(org.apache.xerces.xs.XSModel xsModel)
xsModel - An XSModel object representing a GML application schema.public String generateXPathExpression(List<QName> elemNames, Map<String,String> namespaceBindings)
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).Copyright © 2023 Open Geospatial Consortium. All rights reserved.