public class CommonFixture extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
CommonFixture.GeoPackageVersion |
| Modifier and Type | Field and Description |
|---|---|
protected Connection |
databaseConnection |
protected DataSource |
dataSource
A JDBC DataSource for accessing the SQLite database.
|
protected File |
gpkgFile
A SQLite database file containing a GeoPackage.
|
static String |
ROOT_PKG_PATH
Root test suite package (absolute path).
|
| Constructor and Description |
|---|
CommonFixture() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkPrimaryKey(String tableName,
String pkName)
This function checks to determine whether the primary key is valid.
|
void |
close() |
protected CommonFixture.GeoPackageVersion[] |
getAllowedVersions() |
protected CommonFixture.GeoPackageVersion |
getGeopackageVersion() |
protected String |
getPrimaryKeyColumn(String tableName)
This function returns the name of a single primary key column for the given table
|
String |
getTestName() |
void |
initCommonFixture(org.testng.ITestContext testContext)
Initializes the common test fixture.
|
protected boolean |
isExtendedType(String tableName,
String columnName)
This function accounts for extensions to Requirement 5 and 25
|
void |
setTestName(String testName) |
void |
validateClassEnabled(org.testng.ITestContext testContext) |
public static final String ROOT_PKG_PATH
protected File gpkgFile
protected DataSource dataSource
protected Connection databaseConnection
protected CommonFixture.GeoPackageVersion[] getAllowedVersions()
protected CommonFixture.GeoPackageVersion getGeopackageVersion()
public void initCommonFixture(org.testng.ITestContext testContext)
throws SQLException,
IOException
testContext - The test context that contains all the information for a test
run, including suite attributes.SQLException - If a database access error occurs.IOException - If attempts to detect the database version failpublic void close()
throws SQLException
SQLExceptionpublic void validateClassEnabled(org.testng.ITestContext testContext)
throws IOException
IOExceptionprotected String getPrimaryKeyColumn(String tableName) throws SQLException
tableName - the name of the tableSQLException - on any errorprotected boolean isExtendedType(String tableName, String columnName) throws SQLException
tableName - the table name to inspectcolumnName - the column name to inspectSQLException - on any errorprotected void checkPrimaryKey(String tableName, String pkName) throws SQLException
tableName - the name of the table (required)pkName - the name of the required primary key (may be null, in which case it is detected)SQLException - on any errorpublic String getTestName()
public void setTestName(String testName)
Copyright © 2018 Open Geospatial Consortium. All rights reserved.