use of jline.UnsupportedTerminal in project GeoGig by boundlessgeo.
the class PGDescribeTest 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 jline.UnsupportedTerminal in project GeoGig by boundlessgeo.
the class PGImportTest 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"));
PGImport importCommand = new PGImport();
importCommand.all = true;
importCommand.dataStoreFactory = TestHelper.createTestFactory();
exception.expect(MockitoException.class);
importCommand.run(mockCli);
}
use of jline.UnsupportedTerminal in project GeoGig by boundlessgeo.
the class GeoJsonImportTest 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"));
GeoJsonImport importCommand = new GeoJsonImport();
importCommand.geoJSONList = new ArrayList<String>();
importCommand.geoJSONList.add(ShpImport.class.getResource("sample.geojson").getFile());
exception.expect(MockitoException.class);
importCommand.run(mockCli);
}
use of jline.UnsupportedTerminal in project GeoGig by boundlessgeo.
the class SQLServerDescribeTest 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 jline.UnsupportedTerminal in project GeoGig by boundlessgeo.
the class SQLServerDescribeTest method testFlushException.
@Test
public void testFlushException() throws Exception {
ConsoleReader consoleReader = spy(new ConsoleReader(System.in, System.out, new UnsupportedTerminal()));
GeogigCLI testCli = new GeogigCLI(consoleReader);
setUpGeogig(testCli);
doThrow(new IOException("Exception")).when(consoleReader).flush();
SQLServerDescribe describeCommand = new SQLServerDescribe();
describeCommand.table = "table1";
describeCommand.dataStoreFactory = TestHelper.createTestFactory();
exception.expect(Exception.class);
describeCommand.run(testCli);
}
Aggregations