use of org.locationtech.geogig.api.porcelain.RemoteAddOp in project GeoGig by boundlessgeo.
the class RemoteAddOpTest method testEmptyName.
@Test
public void testEmptyName() {
final RemoteAddOp remoteAdd = geogig.command(RemoteAddOp.class);
exception.expect(RemoteException.class);
remoteAdd.setName("").setURL("http://test.com").call();
}
use of org.locationtech.geogig.api.porcelain.RemoteAddOp in project GeoGig by boundlessgeo.
the class RemoteAddOpTest method testNullURL.
@Test
public void testNullURL() {
final RemoteAddOp remoteAdd = geogig.command(RemoteAddOp.class);
exception.expect(RemoteException.class);
remoteAdd.setName("myremote").setURL(null).call();
}
use of org.locationtech.geogig.api.porcelain.RemoteAddOp in project GeoGig by boundlessgeo.
the class RemoteAddOpTest method testNullName.
@Test
public void testNullName() {
final RemoteAddOp remoteAdd = geogig.command(RemoteAddOp.class);
exception.expect(RemoteException.class);
remoteAdd.setName(null).setURL("http://test.com").call();
}
use of org.locationtech.geogig.api.porcelain.RemoteAddOp in project GeoGig by boundlessgeo.
the class RemoteRemoveOpTest method testRemoveNonexistentRemote.
@Test
public void testRemoveNonexistentRemote() {
final RemoteAddOp remoteAdd = geogig.command(RemoteAddOp.class);
String remoteName = "myremote";
String remoteURL = "http://test.com";
Remote remote = remoteAdd.setName(remoteName).setURL(remoteURL).call();
assertEquals(remoteName, remote.getName());
assertEquals(remoteURL, remote.getFetchURL());
assertEquals(remoteURL, remote.getPushURL());
assertEquals("+refs/heads/*:refs/remotes/" + remoteName + "/*", remote.getFetch());
final RemoteRemoveOp remoteRemove = geogig.command(RemoteRemoveOp.class);
exception.expect(RemoteException.class);
remoteRemove.setName("nonexistent").call();
}
use of org.locationtech.geogig.api.porcelain.RemoteAddOp in project GeoGig by boundlessgeo.
the class RemoteAddOpTest method testAddRemoteWithBranch.
@Test
public void testAddRemoteWithBranch() {
final RemoteAddOp remoteAdd = geogig.command(RemoteAddOp.class);
String remoteName = "myremote";
String remoteURL = "http://test.com";
String branch = "mybranch";
Remote remote = remoteAdd.setName(remoteName).setURL(remoteURL).setBranch(branch).call();
assertEquals(remoteName, remote.getName());
assertEquals(remoteURL, remote.getFetchURL());
assertEquals(remoteURL, remote.getPushURL());
assertEquals("+refs/heads/" + branch + ":refs/remotes/" + remoteName + "/" + branch, remote.getFetch());
}
Aggregations