コード例 #1
0
ファイル: PGImportTest.java プロジェクト: cadamsQA/geogig
 @Test
 public void testImport() throws Exception {
   PGImport importCommand = new PGImport();
   importCommand.all = true;
   importCommand.support.dataStoreFactory = TestHelper.createTestFactory();
   importCommand.run(cli);
 }
コード例 #2
0
ファイル: PGImportTest.java プロジェクト: cadamsQA/geogig
 @Test
 public void testInvalidDatabaseParams() throws Exception {
   PGImport importCommand = new PGImport();
   importCommand.commonArgs.host = "nonexistent";
   importCommand.all = true;
   exception.expect(CommandFailedException.class);
   importCommand.run(cli);
 }
コード例 #3
0
ファイル: PGImportTest.java プロジェクト: cadamsQA/geogig
 @Test
 public void testImportGetNamesException() throws Exception {
   PGImport importCommand = new PGImport();
   importCommand.all = true;
   importCommand.support.dataStoreFactory = TestHelper.createFactoryWithGetNamesException();
   exception.expect(CommandFailedException.class);
   importCommand.run(cli);
 }
コード例 #4
0
ファイル: PGImportTest.java プロジェクト: cadamsQA/geogig
 @Test
 public void testNullDataStore() throws Exception {
   PGImport importCommand = new PGImport();
   importCommand.all = true;
   importCommand.support.dataStoreFactory = TestHelper.createNullTestFactory();
   exception.expect(CommandFailedException.class);
   importCommand.run(cli);
 }
コード例 #5
0
ファイル: PGImportTest.java プロジェクト: cadamsQA/geogig
 @Test
 public void testNoTableNotAll() throws Exception {
   PGImport importCommand = new PGImport();
   importCommand.all = false;
   importCommand.table = "";
   importCommand.support.dataStoreFactory = TestHelper.createTestFactory();
   exception.expect(CommandFailedException.class);
   importCommand.run(cli);
 }
コード例 #6
0
ファイル: PGImportTest.java プロジェクト: cadamsQA/geogig
 @Test
 public void testImportException() throws Exception {
   when(cli.getConsole()).thenThrow(new MockitoException("Exception"));
   PGImport importCommand = new PGImport();
   importCommand.all = true;
   importCommand.support.dataStoreFactory = TestHelper.createTestFactory();
   exception.expect(MockitoException.class);
   importCommand.run(cli);
 }