if (onlineTestId != null) {
// if test if running in online mode, need to use db params
onlineTestId = onlineTestId.trim().toLowerCase();
Map<String, File> propertyFiles = new HashMap<String, File>();
propertyFiles.put(propertiesFile.getName(), dir);
AbstractReferenceDataSetup setup;
if (onlineTestId.equals("oracle")) {
// oracle
mapping = mapping.replaceAll(DS_PARAMETERS, Matcher
.quoteReplacement(AppSchemaTestOracleSetup.DB_PARAMS));
setup = AppSchemaTestOracleSetup.getInstance(propertyFiles);
} else {
// postgis
mapping = mapping.replaceAll(DS_PARAMETERS, Matcher
.quoteReplacement(AppSchemaTestPostgisSetup.DB_PARAMS));
setup = AppSchemaTestPostgisSetup.getInstance(propertyFiles);
}
// Run the sql script to create the tables from properties files
setup.setUp();
setup.tearDown();
}
IOUtils.copy(new ByteArrayInputStream(mapping.getBytes("UTF-8")), new File(dir,
"MappedFeature.xml"));
}