Package org.opengis.cite.citygml30part2
Class CommonFixture
java.lang.Object
org.opengis.cite.citygml30part2.CommonFixture
- Direct Known Subclasses:
AppearanceModuleValidation,BridgeModuleValidation,BuildingModuleValidation,CityFurnitureModuleValidation,CityObjectGroupModuleValidation,ConstructionModuleValidation,CoreValidation,DynamizerModuleValidation,GenericsModuleValidation,GlobalValidation,LandUseModuleValidation,PointCloudModuleValidation,ReliefModuleValidation,TransportationModuleValidation,TunnelModuleValidation,VegetationModuleValidation,VersioningModuleValidation,WaterBodyModuleValidation
A supporting base class that sets up a common test fixture. These configuration methods
are invoked before those defined in a subclass.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected jakarta.ws.rs.client.ClientHTTP client component (JAX-RS Client API).protected org.glassfish.jersey.client.ClientRequestAn HTTP request message.protected jakarta.ws.rs.core.ResponseAn HTTP response message.static final StringRoot test suite package (absolute path).protected Document -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgetResponseEntityAsDocument(jakarta.ws.rs.core.Response response, String targetURI) Obtains the (XML) response entity as a DOM Document.voidinitCommonFixture(org.testng.ITestContext testContext) Initializes the common test fixture with a client component for interacting with HTTP endpoints.Transform XML Document to UTF-8 String
-
Field Details
-
ROOT_PKG_PATH
Root test suite package (absolute path).- See Also:
-
client
protected jakarta.ws.rs.client.Client clientHTTP client component (JAX-RS Client API). -
request
protected org.glassfish.jersey.client.ClientRequest requestAn HTTP request message. -
response
protected jakarta.ws.rs.core.Response responseAn HTTP response message. -
testSubject
-
-
Constructor Details
-
CommonFixture
public CommonFixture()
-
-
Method Details
-
initCommonFixture
@BeforeClass public void initCommonFixture(org.testng.ITestContext testContext) Initializes the common test fixture with a client component for interacting with HTTP endpoints.- Parameters:
testContext- The test context that contains all the information for a test run, including suite attributes.
-
clearMessages
@BeforeMethod public void clearMessages() -
getResponseEntityAsDocument
Obtains the (XML) response entity as a DOM Document. This convenience method wraps a static method call to facilitate unit testing (Mockito workaround).- Parameters:
response- A representation of an HTTP response message.targetURI- The target URI from which the entity was retrieved (may be null).- Returns:
- A Document representing the entity.
- See Also:
-
TransformXMLDocumentToXMLString
Transform XML Document to UTF-8 String- Parameters:
xmlDoc- The XML Document- Returns:
- A String data type of XML Document
- Throws:
Exception- TransformerConfigurationException, TransformerException
-