use of org.mockito.exceptions.base.MockitoException 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.mockito.exceptions.base.MockitoException 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 org.mockito.exceptions.base.MockitoException 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 org.mockito.exceptions.base.MockitoException 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 org.mockito.exceptions.base.MockitoException 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);
}
Aggregations