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