Package org.locationtech.geogig.cli

Examples of org.locationtech.geogig.cli.GeogigCLI


        if (geogigCLI != null) {
            geogigCLI.close();
        }

        geogigCLI = new GeogigCLI(GlobalState.consoleReader);
        GlobalContextBuilder.builder = injectorBuilder;
        Platform platform = injector.platform();
        geogigCLI.setPlatform(platform);
        geogigCLI.tryConfigureLogging();
    }
View Full Code Here


            // pass it a BufferedOutputStream 'cause it doesn't buffer the internal FileOutputStream
            ConsoleReader console = new ConsoleReader(in, new BufferedOutputStream(out),
                    new UnsupportedTerminal());
            Platform platform = geogig.getPlatform();

            GeogigCLI geogigCLI = new GeogigCLI(geogig, console);
            geogigCLI.setPlatform(platform);
            geogigCLI.disableProgressListener();

            String[] args = ArgumentTokenizer.tokenize(command);
            final int exitCode = geogigCLI.execute(args);
            response = new JsonObject();
            response.addProperty("id", queryId);

            final int charCountLimit = getOutputLimit(geogig.getContext());
            final StringBuilder output = getLimitedOutput(out, charCountLimit);
View Full Code Here

    @Before
    public void setUp() throws Exception {
        ConsoleReader consoleReader = new ConsoleReader(System.in, System.out,
                new UnsupportedTerminal());
        cli = new GeogigCLI(consoleReader);

        setUpGeogig(cli);
    }
View Full Code Here

    @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"));
        ShpImport importCommand = new ShpImport();
        importCommand.shapeFile = new ArrayList<String>();
        importCommand.shapeFile.add(ShpImport.class.getResource("shape.shp").getFile());
        exception.expect(MockitoException.class);
        importCommand.run(mockCli);
View Full Code Here

    @Before
    public void setUp() throws Exception {
        ConsoleReader consoleReader = new ConsoleReader(System.in, System.out,
                new UnsupportedTerminal());
        cli = new GeogigCLI(consoleReader);

        setUpGeogig(cli);
    }
View Full Code Here

    @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);
View Full Code Here

    @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();
View Full Code Here

    @Before
    public void setUp() throws Exception {
        ConsoleReader consoleReader = new ConsoleReader(System.in, System.out,
                new UnsupportedTerminal());
        cli = new GeogigCLI(consoleReader);

        setUpGeogig(cli);
    }
View Full Code Here

    @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);
    }
View Full Code Here

    @Before
    public void setUp() throws Exception {
        ConsoleReader consoleReader = new ConsoleReader(System.in, System.out,
                new UnsupportedTerminal());
        cli = new GeogigCLI(consoleReader);

        setUpGeogig(cli);
    }
View Full Code Here

TOP

Related Classes of org.locationtech.geogig.cli.GeogigCLI

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.