Search in sources :

Example 1 with UnsupportedTerminal

use of jline.UnsupportedTerminal in project GeoGig by boundlessgeo.

the class ShpImportTest method setUp.

@Before
public void setUp() throws Exception {
    ConsoleReader consoleReader = new ConsoleReader(System.in, System.out, new UnsupportedTerminal());
    cli = new GeogigCLI(consoleReader);
    setUpGeogig(cli);
}
Also used : GeogigCLI(org.locationtech.geogig.cli.GeogigCLI) ConsoleReader(jline.console.ConsoleReader) UnsupportedTerminal(jline.UnsupportedTerminal) Before(org.junit.Before)

Example 2 with UnsupportedTerminal

use of jline.UnsupportedTerminal in project GeoGig by boundlessgeo.

the class PGDescribeTest 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"));
    PGDescribe describeCommand = new PGDescribe();
    describeCommand.table = "table1";
    describeCommand.dataStoreFactory = TestHelper.createTestFactory();
    exception.expect(MockitoException.class);
    describeCommand.run(mockCli);
}
Also used : GeogigCLI(org.locationtech.geogig.cli.GeogigCLI) ConsoleReader(jline.console.ConsoleReader) UnsupportedTerminal(jline.UnsupportedTerminal) MockitoException(org.mockito.exceptions.base.MockitoException) Test(org.junit.Test)

Example 3 with UnsupportedTerminal

use of jline.UnsupportedTerminal in project GeoGig by boundlessgeo.

the class PGExportTest 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();
}
Also used : GeogigCLI(org.locationtech.geogig.cli.GeogigCLI) ConsoleReader(jline.console.ConsoleReader) UnsupportedTerminal(jline.UnsupportedTerminal) CommitOp(org.locationtech.geogig.api.porcelain.CommitOp)

Example 4 with UnsupportedTerminal

use of jline.UnsupportedTerminal in project GeoGig by boundlessgeo.

the class PGImportTest method setUp.

@Before
public void setUp() throws Exception {
    ConsoleReader consoleReader = new ConsoleReader(System.in, System.out, new UnsupportedTerminal());
    cli = new GeogigCLI(consoleReader);
    setUpGeogig(cli);
}
Also used : GeogigCLI(org.locationtech.geogig.cli.GeogigCLI) ConsoleReader(jline.console.ConsoleReader) UnsupportedTerminal(jline.UnsupportedTerminal) Before(org.junit.Before)

Example 5 with UnsupportedTerminal

use of jline.UnsupportedTerminal in project GeoGig by boundlessgeo.

the class PGListTest method setUp.

@Before
public void setUp() throws Exception {
    ConsoleReader consoleReader = new ConsoleReader(System.in, System.out, new UnsupportedTerminal());
    cli = new GeogigCLI(consoleReader);
    setUpGeogig(cli);
}
Also used : GeogigCLI(org.locationtech.geogig.cli.GeogigCLI) ConsoleReader(jline.console.ConsoleReader) UnsupportedTerminal(jline.UnsupportedTerminal) Before(org.junit.Before)

Aggregations

UnsupportedTerminal (jline.UnsupportedTerminal)45 ConsoleReader (jline.console.ConsoleReader)44 GeogigCLI (org.locationtech.geogig.cli.GeogigCLI)42 Before (org.junit.Before)20 Test (org.junit.Test)15 MockitoException (org.mockito.exceptions.base.MockitoException)12 TestPlatform (org.locationtech.geogig.api.TestPlatform)8 File (java.io.File)7 CLITestContextBuilder (org.locationtech.geogig.cli.test.functional.general.CLITestContextBuilder)7 IOException (java.io.IOException)6 CommitOp (org.locationtech.geogig.api.porcelain.CommitOp)6 ByteArrayInputStream (java.io.ByteArrayInputStream)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)2 Terminal (jline.Terminal)2 Platform (org.locationtech.geogig.api.Platform)2 FileBackedOutputStream (com.google.common.io.FileBackedOutputStream)1 JsonObject (com.google.gson.JsonObject)1 Substitute (com.oracle.svm.core.annotate.Substitute)1 BufferedOutputStream (java.io.BufferedOutputStream)1 InputStream (java.io.InputStream)1