@Test public void testExportWithNoArgs() throws Exception { GeopkgExport exportCommand = new GeopkgExport(); exportCommand.args = Arrays.asList(); exception.expect(CommandFailedException.class); exportCommand.run(cli); }
@Test public void testExportWithNoArgs() throws Exception { GeopkgExport exportCommand = new GeopkgExport(); exportCommand.args = Arrays.asList(); exception.expect(CommandFailedException.class); exportCommand.run(cli); }
@Test public void testExportWithInvalidFeatureType() throws Exception { GeopkgExport exportCommand = new GeopkgExport(); String geoPkgFileName = support.newFile().getAbsolutePath(); exportCommand.args = Arrays.asList("invalidType", "Points"); exportCommand.commonArgs.database = geoPkgFileName; exception.expect(InvalidParameterException.class); exportCommand.run(cli); }
@Test public void testExportWithNullFeatureType() throws Exception { GeopkgExport exportCommand = new GeopkgExport(); String geoPkgFileName = support.newFile().getAbsolutePath(); exportCommand.args = Arrays.asList(null, "Points"); exportCommand.commonArgs.database = geoPkgFileName; exception.expect(InvalidParameterException.class); exportCommand.run(cli); }
@Test public void testExportWithInvalidFeatureType() throws Exception { GeopkgExport exportCommand = new GeopkgExport(); String geoPkgFileName = support.newFile().getAbsolutePath(); exportCommand.args = Arrays.asList("invalidType", "Points"); exportCommand.commonArgs.database = geoPkgFileName; exception.expect(InvalidParameterException.class); exportCommand.run(cli); }
@Test public void testExportWithNullFeatureType() throws Exception { GeopkgExport exportCommand = new GeopkgExport(); String geoPkgFileName = support.newFile().getAbsolutePath(); exportCommand.args = Arrays.asList(null, "Points"); exportCommand.commonArgs.database = geoPkgFileName; exception.expect(InvalidParameterException.class); exportCommand.run(cli); }
@Test public void testExportToFileThatAlreadyExistsWithOverwrite() throws Exception { GeopkgExport exportCommand = new GeopkgExport(); File geoPkgFile = support.newFile(); String geoPkgFileName = geoPkgFile.getAbsolutePath(); exportCommand.args = Arrays.asList("Points", "Points"); exportCommand.commonArgs.database = geoPkgFileName; exportCommand.run(cli); // Write lines to the old points table exportCommand.args = Arrays.asList("Lines", "Points"); exportCommand.commonArgs.database = geoPkgFileName; exportCommand.overwrite = true; exportCommand.run(cli); // Verify GeoPackage DataStore store = store(geoPkgFile); try { assertFeatures(store, pointsType.getTypeName(), lines1, lines2, lines3); } finally { store.dispose(); } deleteGeoPkg(geoPkgFileName); }
@Test public void testExportToFileThatAlreadyExistsWithOverwrite() throws Exception { GeopkgExport exportCommand = new GeopkgExport(); File geoPkgFile = support.newFile(); String geoPkgFileName = geoPkgFile.getAbsolutePath(); exportCommand.args = Arrays.asList("Points", "Points"); exportCommand.commonArgs.database = geoPkgFileName; exportCommand.run(cli); // Write lines to the old points table exportCommand.args = Arrays.asList("Lines", "Points"); exportCommand.commonArgs.database = geoPkgFileName; exportCommand.overwrite = true; exportCommand.run(cli); // Verify GeoPackage DataStore store = store(geoPkgFile); try { assertFeatures(store, pointsType.getTypeName(), lines1, lines2, lines3); } finally { store.dispose(); } deleteGeoPkg(geoPkgFileName); }
@Test public void testExportToFileThatAlreadyExists() throws Exception { GeopkgExport exportCommand = new GeopkgExport(); File geoPkgFile = support.newFile(); String geoPkgFileName = geoPkgFile.getAbsolutePath(); exportCommand.args = Arrays.asList("WORK_HEAD:Points", "Points"); exportCommand.commonArgs.database = geoPkgFileName; exportCommand.run(cli); exportCommand.args = Arrays.asList("WORK_HEAD:Lines", "Lines"); exportCommand.commonArgs.database = geoPkgFileName; exportCommand.run(cli); // Verify GeoPackage DataStore store = store(geoPkgFile); try { assertFeatures(store, pointsType.getTypeName(), points1, points2, points3); assertFeatures(store, linesType.getTypeName(), lines1, lines2, lines3); } finally { store.dispose(); } deleteGeoPkg(geoPkgFileName); }
@Test public void testExportToFileThatAlreadyExists() throws Exception { GeopkgExport exportCommand = new GeopkgExport(); File geoPkgFile = support.newFile(); String geoPkgFileName = geoPkgFile.getAbsolutePath(); exportCommand.args = Arrays.asList("WORK_HEAD:Points", "Points"); exportCommand.commonArgs.database = geoPkgFileName; exportCommand.run(cli); exportCommand.args = Arrays.asList("WORK_HEAD:Lines", "Lines"); exportCommand.commonArgs.database = geoPkgFileName; exportCommand.run(cli); // Verify GeoPackage DataStore store = store(geoPkgFile); try { assertFeatures(store, pointsType.getTypeName(), points1, points2, points3); assertFeatures(store, linesType.getTypeName(), lines1, lines2, lines3); } finally { store.dispose(); } deleteGeoPkg(geoPkgFileName); }
@Test public void testExport() throws Exception { GeopkgExport exportCommand = new GeopkgExport(); File geoPkgFile = support.newFile(); String geoPkgFileName = geoPkgFile.getAbsolutePath(); exportCommand.args = Arrays.asList("Points", "Points"); exportCommand.commonArgs.database = geoPkgFileName; exportCommand.run(cli); // Verify GeoPackage DataStore store = store(geoPkgFile); try { assertFeatures(store, pointsType.getTypeName(), points1, points2, points3); } finally { store.dispose(); } deleteGeoPkg(geoPkgFileName); }
@Test public void testExport() throws Exception { GeopkgExport exportCommand = new GeopkgExport(); File geoPkgFile = support.newFile(); String geoPkgFileName = geoPkgFile.getAbsolutePath(); exportCommand.args = Arrays.asList("Points", "Points"); exportCommand.commonArgs.database = geoPkgFileName; exportCommand.run(cli); // Verify GeoPackage DataStore store = store(geoPkgFile); try { assertFeatures(store, pointsType.getTypeName(), points1, points2, points3); } finally { store.dispose(); } deleteGeoPkg(geoPkgFileName); }
exportCommand.commonArgs.database = geoPkgFileName; exportCommand.interchangeFormat = true; exportCommand.run(localRepo.geogigCLI);
exportCommand.commonArgs.database = geoPkgFileName; exportCommand.interchangeFormat = true; exportCommand.run(localRepo.geogigCLI);
exportCommand.commonArgs.database = geoPkgFileName; exportCommand.interchangeFormat = true; exportCommand.run(localRepo.geogigCLI);
exportCommand.commonArgs.database = geoPkgFileName; exportCommand.interchangeFormat = true; exportCommand.run(localRepo.geogigCLI);
exportCommand.commonArgs.database = geoPkgFileName; exportCommand.interchangeFormat = true; exportCommand.run(cli);
exportCommand.commonArgs.database = geoPkgFileName; exportCommand.interchangeFormat = true; exportCommand.run(cli);
exportCommand.commonArgs.database = geoPkgFileName; exportCommand.interchangeFormat = true; exportCommand.run(cli);
exportCommand.commonArgs.database = geoPkgFileName; exportCommand.interchangeFormat = true; exportCommand.run(cli);