Search in sources :

Example 21 with ConfigOp

use of org.locationtech.geogig.api.porcelain.ConfigOp in project GeoGig by boundlessgeo.

the class ConfigOpTest method testInvalidSectionKey.

@Test
public void testInvalidSectionKey() {
    final ConfigOp config = geogig.command(ConfigOp.class);
    Optional<Map<String, String>> result = config.setScope(ConfigScope.GLOBAL).setAction(ConfigAction.CONFIG_GET).setName("doesnt.exist").setValue(null).call();
    assertFalse(result.isPresent());
}
Also used : ConfigOp(org.locationtech.geogig.api.porcelain.ConfigOp) HashMap(java.util.HashMap) Map(java.util.Map) Test(org.junit.Test)

Example 22 with ConfigOp

use of org.locationtech.geogig.api.porcelain.ConfigOp in project GeoGig by boundlessgeo.

the class ConfigOpTest method testTooManyArguments.

@Test
public void testTooManyArguments() {
    final ConfigOp config = geogig.command(ConfigOp.class);
    exception.expect(ConfigException.class);
    config.setScope(ConfigScope.GLOBAL).setAction(ConfigAction.CONFIG_GET).setName("too.many").setValue("arguments").call();
}
Also used : ConfigOp(org.locationtech.geogig.api.porcelain.ConfigOp) Test(org.junit.Test)

Aggregations

ConfigOp (org.locationtech.geogig.api.porcelain.ConfigOp)22 Test (org.junit.Test)21 Remote (org.locationtech.geogig.api.Remote)4 ConfigException (org.locationtech.geogig.api.porcelain.ConfigException)4 RemoteAddOp (org.locationtech.geogig.api.porcelain.RemoteAddOp)4 ConfigDatabase (org.locationtech.geogig.storage.ConfigDatabase)4 HashMap (java.util.HashMap)3 Map (java.util.Map)2 RemoteListOp (org.locationtech.geogig.api.porcelain.RemoteListOp)2 RemoteRemoveOp (org.locationtech.geogig.api.porcelain.RemoteRemoveOp)2 Matchers.anyString (org.mockito.Matchers.anyString)1