Package org.locationtech.geogig.api.porcelain

Examples of org.locationtech.geogig.api.porcelain.ConfigOp


        assertEquals(ConfigAction.CONFIG_GET, ConfigAction.valueOf("CONFIG_GET"));
    }

    @Test
    public void testNoAction() {
        final ConfigOp config = geogig.command(ConfigOp.class);

        exception.expect(ConfigException.class);
        config.setAction(ConfigAction.CONFIG_NO_ACTION).setName("section.key").setValue(null)
                .call();
    }
View Full Code Here


                .call();
    }

    @Test
    public void testFallback() {
        final ConfigOp config = geogig.command(ConfigOp.class);

        // Set a value in global config, then try to get value from local even though
        // we're not in a valid repository
        config.setAction(ConfigAction.CONFIG_SET).setScope(ConfigScope.GLOBAL)
                .setName("section.key").setValue("1").call();
        Optional<Map<String, String>> value = config.setAction(ConfigAction.CONFIG_GET)
                .setScope(ConfigScope.LOCAL).setName("section.key").setValue(null).call();
        assertTrue(value.isPresent());
        assertEquals("1", value.get().get("section.key"));

        value = Optional.absent();
        value = config.setAction(ConfigAction.CONFIG_GET).setScope(ConfigScope.LOCAL)
                .setName("section.key").setValue("").call();
        assertTrue(value.isPresent());
        assertEquals("1", value.get().get("section.key"));
    }
View Full Code Here

TOP

Related Classes of org.locationtech.geogig.api.porcelain.ConfigOp

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.