use of jline.console.ConsoleReader 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);
}
use of jline.console.ConsoleReader in project GeoGig by boundlessgeo.
the class OracleExportTest method setUpInternal.
@Override
public void setUpInternal() throws Exception {
ConsoleReader consoleReader = new ConsoleReader(System.in, System.out, new UnsupportedTerminal());
cli = new GeogigCLI(consoleReader);
cli.setGeogig(geogig);
// Add points
insertAndAdd(points1);
insertAndAdd(points2);
insertAndAdd(points3);
geogig.command(CommitOp.class).call();
// Add lines
insertAndAdd(lines1);
insertAndAdd(lines2);
insertAndAdd(lines3);
geogig.command(CommitOp.class).call();
}
use of jline.console.ConsoleReader in project GeoGig by boundlessgeo.
the class OracleImportTest 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.console.ConsoleReader in project GeoGig by boundlessgeo.
the class OracleImportTest 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"));
OracleImport importCommand = new OracleImport();
importCommand.all = true;
importCommand.dataStoreFactory = TestHelper.createTestFactory();
exception.expect(MockitoException.class);
importCommand.run(mockCli);
}
use of jline.console.ConsoleReader in project GeoGig by boundlessgeo.
the class PGDescribeTest 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();
PGDescribe describeCommand = new PGDescribe();
describeCommand.table = "table1";
describeCommand.dataStoreFactory = TestHelper.createTestFactory();
exception.expect(Exception.class);
describeCommand.run(testCli);
}
Aggregations