Package org.geoserver.test.onlineTest.support

Examples of org.geoserver.test.onlineTest.support.AbstractReferenceDataSetup


     * Determine which setup class to use based on the fixture id specified in the vm arg.
     *
     * @throws Exception
     */
    private void createTablesInTestDatabase() throws Exception {
        AbstractReferenceDataSetup setup = null;
        if (isOracleOnlineTest()) {
            if (is3D) {
                setup = AppSchemaTestOracleSetup.get3DInstance(propertiesFiles);
            } else {
                setup = AppSchemaTestOracleSetup.getInstance(propertiesFiles);
            }
            // Run the sql script through setup
            setup.setUp();
            setup.tearDown();
        } else if (isPostgisOnlineTest()) {
            setup = AppSchemaTestPostgisSetup.getInstance(propertiesFiles);
            // Run the sql script through setup
            setup.setUp();
            setup.tearDown();
        }
    }
View Full Code Here


        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"));
    }
View Full Code Here

TOP

Related Classes of org.geoserver.test.onlineTest.support.AbstractReferenceDataSetup

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.