Search in sources :

Example 6 with RemoteRemoveOp

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

the class RemoteRemoveOpTest method testEmptyName.

@Test
public void testEmptyName() {
    final RemoteRemoveOp remoteRemove = geogig.command(RemoteRemoveOp.class);
    exception.expect(RemoteException.class);
    remoteRemove.setName("").call();
}
Also used : RemoteRemoveOp(org.locationtech.geogig.api.porcelain.RemoteRemoveOp) Test(org.junit.Test)

Example 7 with RemoteRemoveOp

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

the class RemoteRemoveOpTest method testNullName.

@Test
public void testNullName() {
    final RemoteRemoveOp remoteRemove = geogig.command(RemoteRemoveOp.class);
    exception.expect(RemoteException.class);
    remoteRemove.setName(null).call();
}
Also used : RemoteRemoveOp(org.locationtech.geogig.api.porcelain.RemoteRemoveOp) Test(org.junit.Test)

Example 8 with RemoteRemoveOp

use of org.locationtech.geogig.api.porcelain.RemoteRemoveOp 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();
}
Also used : RemoteRemoveOp(org.locationtech.geogig.api.porcelain.RemoteRemoveOp) RemoteAddOp(org.locationtech.geogig.api.porcelain.RemoteAddOp) Remote(org.locationtech.geogig.api.Remote) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)8 RemoteRemoveOp (org.locationtech.geogig.api.porcelain.RemoteRemoveOp)8 Remote (org.locationtech.geogig.api.Remote)5 RemoteAddOp (org.locationtech.geogig.api.porcelain.RemoteAddOp)5 ConfigOp (org.locationtech.geogig.api.porcelain.ConfigOp)2 Ref (org.locationtech.geogig.api.Ref)1 UpdateRef (org.locationtech.geogig.api.plumbing.UpdateRef)1