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);
}
use of jline.UnsupportedTerminal in project GeoGig by boundlessgeo.
the class SQLServerDescribeTest method testDescribeException.
@Test
public void testDescribeException() 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"));
SQLServerDescribe describeCommand = new SQLServerDescribe();
describeCommand.table = "table1";
describeCommand.dataStoreFactory = TestHelper.createTestFactory();
exception.expect(MockitoException.class);
describeCommand.run(mockCli);
}
use of jline.UnsupportedTerminal in project GeoGig by boundlessgeo.
the class PGListTest 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"));
PGList listCommand = new PGList();
listCommand.dataStoreFactory = TestHelper.createTestFactory();
exception.expect(MockitoException.class);
listCommand.run(mockCli);
}
Aggregations