use of org.locationtech.geogig.api.porcelain.ConfigOp in project GeoGig by boundlessgeo.
the class ConfigOpTest method testListLocalWithNoLocalRepository.
@Test
public void testListLocalWithNoLocalRepository() {
ConfigDatabase database = mock(ConfigDatabase.class);
when(database.getAll()).thenThrow(new ConfigException(StatusCode.INVALID_LOCATION));
ConfigOp config = new ConfigOp(database);
exception.expect(ConfigException.class);
config.setScope(ConfigScope.LOCAL).setAction(ConfigAction.CONFIG_LIST).setName(null).setValue(null).call();
}
use of org.locationtech.geogig.api.porcelain.ConfigOp in project GeoGig by boundlessgeo.
the class ConfigOpTest method testEmptyNameForUnset.
@Test
public void testEmptyNameForUnset() {
final ConfigOp config = geogig.command(ConfigOp.class);
exception.expect(ConfigException.class);
config.setScope(ConfigScope.GLOBAL).setAction(ConfigAction.CONFIG_UNSET).setName("").setValue(null).call();
}
use of org.locationtech.geogig.api.porcelain.ConfigOp in project GeoGig by boundlessgeo.
the class ConfigOpTest method testGetLocalWithNoLocalRepository.
@Test
public void testGetLocalWithNoLocalRepository() {
ConfigDatabase database = mock(ConfigDatabase.class);
when(database.get(anyString())).thenThrow(new ConfigException(StatusCode.INVALID_LOCATION));
ConfigOp config = new ConfigOp(database);
exception.expect(ConfigException.class);
config.setScope(ConfigScope.LOCAL).setAction(ConfigAction.CONFIG_GET).setName("section.key").setValue(null).call();
}
use of org.locationtech.geogig.api.porcelain.ConfigOp in project GeoGig by boundlessgeo.
the class ConfigOpTest method testRemovingMissingSection.
@Test
public void testRemovingMissingSection() {
final ConfigOp config = geogig.command(ConfigOp.class);
exception.expect(ConfigException.class);
config.setScope(ConfigScope.GLOBAL).setAction(ConfigAction.CONFIG_REMOVE_SECTION).setName("unusedsectionname").setValue(null).call();
}
use of org.locationtech.geogig.api.porcelain.ConfigOp in project GeoGig by boundlessgeo.
the class ConfigOpTest method testNoNameForRemoveSection.
@Test
public void testNoNameForRemoveSection() {
final ConfigOp config = geogig.command(ConfigOp.class);
exception.expect(ConfigException.class);
config.setScope(ConfigScope.GLOBAL).setAction(ConfigAction.CONFIG_REMOVE_SECTION).setName(null).setValue(null).call();
}
Aggregations