Package org.locationtech.geogig.api.porcelain

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


    public final void setUpInternal() {
    }

    @Test
    public void testNullName() {
        final RemoteRemoveOp remoteRemove = geogig.command(RemoteRemoveOp.class);

        exception.expect(RemoteException.class);
        remoteRemove.setName(null).call();
    }
View Full Code Here


        remoteRemove.setName(null).call();
    }

    @Test
    public void testEmptyName() {
        final RemoteRemoveOp remoteRemove = geogig.command(RemoteRemoveOp.class);

        exception.expect(RemoteException.class);
        remoteRemove.setName("").call();
    }
View Full Code Here

        remoteRemove.setName("").call();
    }

    @Test
    public void testRemoveNoRemotes() {
        final RemoteRemoveOp remoteRemove = geogig.command(RemoteRemoveOp.class);

        exception.expect(RemoteException.class);
        remoteRemove.setName("remote").call();
    }
View Full Code Here

        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();
    }
View Full Code Here

        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);

        Remote deletedRemote = remoteRemove.setName(remoteName).call();

        assertEquals(remoteName, deletedRemote.getName());
        assertEquals(remoteURL, deletedRemote.getFetchURL());
        assertEquals(remoteURL, deletedRemote.getPushURL());
        assertEquals("+refs/heads/*:refs/remotes/" + remoteName + "/*", deletedRemote.getFetch());
View Full Code Here

        assertEquals("+refs/heads/*:refs/remotes/" + remoteName + "/*", remote.getFetch());

        String refName = Ref.REMOTES_PREFIX + remoteName + "/branch1";
        geogig.command(UpdateRef.class).setName(refName).setNewValue(ObjectId.NULL).call();

        final RemoteRemoveOp remoteRemove = geogig.command(RemoteRemoveOp.class);

        Remote deletedRemote = remoteRemove.setName(remoteName).call();

        Optional<Ref> remoteRef = geogig.command(RefParse.class).setName(refName).call();

        assertFalse(remoteRef.isPresent());

View Full Code Here

        assertEquals("+refs/heads/*:refs/remotes/" + remoteName + "/*", remote.getFetch());

        final ConfigOp config = geogig.command(ConfigOp.class);
        config.setAction(ConfigAction.CONFIG_UNSET).setName("remote." + remoteName + ".url").call();

        final RemoteRemoveOp remoteRemove = geogig.command(RemoteRemoveOp.class);

        Remote deletedRemote = remoteRemove.setName(remoteName).call();

        assertEquals(remoteName, deletedRemote.getName());
        assertEquals("", deletedRemote.getFetchURL());
        assertEquals("", deletedRemote.getPushURL());
        assertEquals("+refs/heads/*:refs/remotes/" + remoteName + "/*", deletedRemote.getFetch());
View Full Code Here

        final ConfigOp config = geogig.command(ConfigOp.class);
        config.setAction(ConfigAction.CONFIG_UNSET).setName("remote." + remoteName + ".fetch")
                .call();

        final RemoteRemoveOp remoteRemove = geogig.command(RemoteRemoveOp.class);

        Remote deletedRemote = remoteRemove.setName(remoteName).call();

        assertEquals(remoteName, deletedRemote.getName());
        assertEquals(remoteURL, deletedRemote.getFetchURL());
        assertEquals(remoteURL, deletedRemote.getPushURL());
        assertEquals("", deletedRemote.getFetch());
View Full Code Here

TOP

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

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.