use of org.locationtech.geogig.api.TestPlatform in project GeoGig by boundlessgeo.
the class OSMHistoryImportTest method setUp.
@Before
public void setUp() throws Exception {
ConsoleReader consoleReader = new ConsoleReader(System.in, System.out, new UnsupportedTerminal());
cli = new GeogigCLI(consoleReader);
fakeOsmApiUrl = getClass().getResource("../../internal/history/01_10").toExternalForm();
File workingDirectory = tempFolder.getRoot();
TestPlatform platform = new TestPlatform(workingDirectory);
GlobalContextBuilder.builder = new CLITestContextBuilder(platform);
cli.setPlatform(platform);
cli.execute("init");
assertTrue(new File(workingDirectory, ".geogig").exists());
}
use of org.locationtech.geogig.api.TestPlatform in project GeoGig by boundlessgeo.
the class OSMApplyDiffTest method setUp.
@Before
public void setUp() throws Exception {
ConsoleReader consoleReader = new ConsoleReader(System.in, System.out, new UnsupportedTerminal());
cli = new GeogigCLI(consoleReader);
File workingDirectory = tempFolder.getRoot();
TestPlatform platform = new TestPlatform(workingDirectory);
GlobalContextBuilder.builder = new CLITestContextBuilder(platform);
cli.setPlatform(platform);
cli.execute("init");
cli.execute("config", "user.name", "Gabriel Roldan");
cli.execute("config", "user.email", "groldan@boundlessgeo.com");
assertTrue(new File(workingDirectory, ".geogig").exists());
}
use of org.locationtech.geogig.api.TestPlatform in project GeoGig by boundlessgeo.
the class OSMExportSLTest method setUp.
@Before
public void setUp() throws Exception {
ConsoleReader consoleReader = new ConsoleReader(System.in, System.out, new UnsupportedTerminal());
cli = new GeogigCLI(consoleReader);
File workingDirectory = tempFolder.getRoot();
TestPlatform platform = new TestPlatform(workingDirectory);
GlobalContextBuilder.builder = new CLITestContextBuilder(platform);
cli.setPlatform(platform);
cli.execute("init");
cli.execute("config", "user.name", "Gabriel Roldan");
cli.execute("config", "user.email", "groldan@boundlessgeo.com");
assertTrue(new File(workingDirectory, ".geogig").exists());
// Use in-memory database to test whether we can load Spatialite extension
Connection connection = null;
Throwable thrown = null;
try {
Class.forName("org.spatialite.JDBC");
SQLiteConfig config = new SQLiteConfig();
config.enableSpatiaLite(true);
connection = DriverManager.getConnection("jdbc:spatialite::memory:", config.toProperties());
Statement statement = connection.createStatement();
statement.execute("SELECT InitSpatialMetaData();");
} catch (SQLException e) {
thrown = e;
thrown.printStackTrace();
} finally {
if (connection != null) {
connection.close();
}
}
if (thrown != null) {
thrown.printStackTrace();
Assume.assumeNoException(thrown);
}
}
use of org.locationtech.geogig.api.TestPlatform in project GeoGig by boundlessgeo.
the class OSMExportShpTest method setUp.
@Before
public void setUp() throws Exception {
ConsoleReader consoleReader = new ConsoleReader(System.in, System.out, new UnsupportedTerminal());
cli = new GeogigCLI(consoleReader);
File workingDirectory = tempFolder.getRoot();
TestPlatform platform = new TestPlatform(workingDirectory);
GlobalContextBuilder.builder = new CLITestContextBuilder(platform);
cli.setPlatform(platform);
cli.execute("init");
cli.execute("config", "user.name", "Gabriel Roldan");
cli.execute("config", "user.email", "groldan@boundlessgeo.com");
assertTrue(new File(workingDirectory, ".geogig").exists());
}
use of org.locationtech.geogig.api.TestPlatform in project GeoGig by boundlessgeo.
the class OSMExportTest method setUp.
@Before
public void setUp() throws Exception {
ConsoleReader consoleReader = new ConsoleReader(System.in, System.out, new UnsupportedTerminal());
cli = new GeogigCLI(consoleReader);
File workingDirectory = tempFolder.getRoot();
TestPlatform platform = new TestPlatform(workingDirectory);
GlobalContextBuilder.builder = new CLITestContextBuilder(platform);
cli.setPlatform(platform);
cli.execute("init");
cli.execute("config", "user.name", "Gabriel Roldan");
cli.execute("config", "user.email", "groldan@boundlessgeo.com");
assertTrue(new File(workingDirectory, ".geogig").exists());
}
Aggregations