Search in sources :

Example 1 with LsRemote

use of org.locationtech.geogig.api.plumbing.LsRemote in project GeoGig by boundlessgeo.

the class RemoteRepositoryTestCase method lsremote.

protected LsRemote lsremote() {
    LsRemote lsRemote = spy(localGeogig.geogig.command(LsRemote.class));
    doReturn(Optional.of(remoteRepo)).when(lsRemote).getRemoteRepo(any(Remote.class));
    return lsRemote;
}
Also used : LsRemote(org.locationtech.geogig.api.plumbing.LsRemote) Remote(org.locationtech.geogig.api.Remote) LsRemote(org.locationtech.geogig.api.plumbing.LsRemote)

Example 2 with LsRemote

use of org.locationtech.geogig.api.plumbing.LsRemote in project GeoGig by boundlessgeo.

the class RemoteRepositoryTestCase method clone.

protected CloneOp clone() {
    CloneOp clone = spy(localGeogig.geogig.command(CloneOp.class));
    FetchOp fetch = fetch();
    // when(clone.command(FetchOp.class)).thenReturn(fetch);
    doReturn(fetch).when(clone).command(eq(FetchOp.class));
    LsRemote lsRemote = lsremote();
    // when(clone.command(LsRemote.class)).thenReturn(lsRemote);
    doReturn(lsRemote).when(clone).command(eq(LsRemote.class));
    return clone;
}
Also used : CloneOp(org.locationtech.geogig.api.porcelain.CloneOp) FetchOp(org.locationtech.geogig.api.porcelain.FetchOp) LsRemote(org.locationtech.geogig.api.plumbing.LsRemote)

Example 3 with LsRemote

use of org.locationtech.geogig.api.plumbing.LsRemote in project GeoGig by boundlessgeo.

the class RemoteRepositoryTestCase method push.

protected PushOp push() {
    SendPack sendPack = spy(localGeogig.geogig.command(SendPack.class));
    doReturn(Optional.of(remoteRepo)).when(sendPack).getRemoteRepo(any(Remote.class));
    PushOp push = spy(localGeogig.geogig.command(PushOp.class));
    doReturn(sendPack).when(push).command(eq(SendPack.class));
    FetchOp fetch = fetch();
    // when(push.command(FetchOp.class)).thenReturn(fetch);
    doReturn(fetch).when(push).command(eq(FetchOp.class));
    LsRemote lsRemote = lsremote();
    // when(push.command(LsRemote.class)).thenReturn(lsRemote);
    doReturn(lsRemote).when(push).command(eq(LsRemote.class));
    return push;
}
Also used : PushOp(org.locationtech.geogig.api.porcelain.PushOp) SendPack(org.locationtech.geogig.api.plumbing.SendPack) FetchOp(org.locationtech.geogig.api.porcelain.FetchOp) LsRemote(org.locationtech.geogig.api.plumbing.LsRemote) Remote(org.locationtech.geogig.api.Remote) LsRemote(org.locationtech.geogig.api.plumbing.LsRemote)

Example 4 with LsRemote

use of org.locationtech.geogig.api.plumbing.LsRemote in project GeoGig by boundlessgeo.

the class RemoteRepositoryTestCase method pull.

protected PullOp pull() {
    PullOp pull = spy(localGeogig.geogig.command(PullOp.class));
    FetchOp fetch = fetch();
    // when(pull.command(eq(FetchOp.class))).thenReturn(fetch);
    doReturn(fetch).when(pull).command(eq(FetchOp.class));
    LsRemote lsRemote = lsremote();
    // when(pull.command(eq(LsRemote.class))).thenReturn(lsRemote);
    doReturn(lsRemote).when(pull).command(eq(LsRemote.class));
    return pull;
}
Also used : PullOp(org.locationtech.geogig.api.porcelain.PullOp) FetchOp(org.locationtech.geogig.api.porcelain.FetchOp) LsRemote(org.locationtech.geogig.api.plumbing.LsRemote)

Example 5 with LsRemote

use of org.locationtech.geogig.api.plumbing.LsRemote in project GeoGig by boundlessgeo.

the class RemoteRepositoryTestCase method fetch.

protected FetchOp fetch() {
    FetchOp remoteRepoFetch = spy(localGeogig.geogig.command(FetchOp.class));
    doReturn(Optional.of(remoteRepo)).when(remoteRepoFetch).getRemoteRepo(any(Remote.class), any(DeduplicationService.class));
    LsRemote lsRemote = lsremote();
    doReturn(lsRemote).when(remoteRepoFetch).command(eq(LsRemote.class));
    return remoteRepoFetch;
}
Also used : FetchOp(org.locationtech.geogig.api.porcelain.FetchOp) LsRemote(org.locationtech.geogig.api.plumbing.LsRemote) Remote(org.locationtech.geogig.api.Remote) LsRemote(org.locationtech.geogig.api.plumbing.LsRemote) DeduplicationService(org.locationtech.geogig.storage.DeduplicationService)

Aggregations

LsRemote (org.locationtech.geogig.api.plumbing.LsRemote)5 FetchOp (org.locationtech.geogig.api.porcelain.FetchOp)4 Remote (org.locationtech.geogig.api.Remote)3 SendPack (org.locationtech.geogig.api.plumbing.SendPack)1 CloneOp (org.locationtech.geogig.api.porcelain.CloneOp)1 PullOp (org.locationtech.geogig.api.porcelain.PullOp)1 PushOp (org.locationtech.geogig.api.porcelain.PushOp)1 DeduplicationService (org.locationtech.geogig.storage.DeduplicationService)1