use of org.locationtech.geogig.cli.GeogigCLI in project GeoGig by boundlessgeo.
the class ShpImportTest method testImportException.
@Test
public void testImportException() throws Exception {
ConsoleReader consoleReader = new ConsoleReader(System.in, System.out, new UnsupportedTerminal());
GeogigCLI mockCli = spy(new GeogigCLI(consoleReader));
setUpGeogig(mockCli);
when(mockCli.getConsole()).thenThrow(new MockitoException("Exception"));
ShpImport importCommand = new ShpImport();
importCommand.shapeFile = new ArrayList<String>();
importCommand.shapeFile.add(ShpImport.class.getResource("shape.shp").getFile());
exception.expect(MockitoException.class);
importCommand.run(mockCli);
}
use of org.locationtech.geogig.cli.GeogigCLI in project GeoGig by boundlessgeo.
the class SQLServerImportTest method testImportException.
@Test
public void testImportException() throws Exception {
ConsoleReader consoleReader = new ConsoleReader(System.in, System.out, new UnsupportedTerminal());
GeogigCLI mockCli = spy(new GeogigCLI(consoleReader));
setUpGeogig(mockCli);
when(mockCli.getConsole()).thenThrow(new MockitoException("Exception"));
SQLServerImport importCommand = new SQLServerImport();
importCommand.all = true;
importCommand.dataStoreFactory = TestHelper.createTestFactory();
exception.expect(MockitoException.class);
importCommand.run(mockCli);
}
use of org.locationtech.geogig.cli.GeogigCLI in project GeoGig by boundlessgeo.
the class SQLServerImportTest method setUp.
@Before
public void setUp() throws Exception {
ConsoleReader consoleReader = new ConsoleReader(System.in, System.out, new UnsupportedTerminal());
cli = new GeogigCLI(consoleReader);
setUpGeogig(cli);
}
use of org.locationtech.geogig.cli.GeogigCLI in project GeoGig by boundlessgeo.
the class SQLServerListTest method testListException.
@Test
public void testListException() throws Exception {
ConsoleReader consoleReader = new ConsoleReader(System.in, System.out, new UnsupportedTerminal());
GeogigCLI mockCli = spy(new GeogigCLI(consoleReader));
setUpGeogig(mockCli);
when(mockCli.getConsole()).thenThrow(new MockitoException("Exception"));
SQLServerList listCommand = new SQLServerList();
listCommand.dataStoreFactory = TestHelper.createTestFactory();
exception.expect(MockitoException.class);
listCommand.run(mockCli);
}
use of org.locationtech.geogig.cli.GeogigCLI in project GeoGig by boundlessgeo.
the class SQLServerListTest method setUp.
@Before
public void setUp() throws Exception {
ConsoleReader consoleReader = new ConsoleReader(System.in, System.out, new UnsupportedTerminal());
cli = new GeogigCLI(consoleReader);
setUpGeogig(cli);
}
Aggregations