use of org.locationtech.geogig.api.plumbing.merge.MergeScenarioReport in project GeoGig by boundlessgeo.
the class ReportCommitConflictsOpTest method testModifiedAndRemoved.
@Test
public void testModifiedAndRemoved() throws Exception {
insertAndAdd(points1);
geogig.command(CommitOp.class).call();
geogig.command(BranchCreateOp.class).setName("TestBranch").call();
Feature points1Modified = feature(pointsType, idP1, "StringProp1_2", new Integer(1000), "POINT(1 1)");
insertAndAdd(points1Modified);
geogig.command(CommitOp.class).call();
geogig.command(CheckoutOp.class).setSource("TestBranch").call();
deleteAndAdd(points1);
RevCommit branchCommit = geogig.command(CommitOp.class).call();
geogig.command(CheckoutOp.class).setSource("master").call();
MergeScenarioReport conflicts = geogig.command(ReportCommitConflictsOp.class).setCommit(branchCommit).call();
assertEquals(1, conflicts.getConflicts().size());
assertEquals(0, conflicts.getUnconflicted().size());
}
use of org.locationtech.geogig.api.plumbing.merge.MergeScenarioReport in project GeoGig by boundlessgeo.
the class ReportCommitConflictsOpTest method testAddedSameFeature.
@Test
public void testAddedSameFeature() throws Exception {
insertAndAdd(points1);
geogig.command(CommitOp.class).call();
geogig.command(BranchCreateOp.class).setName("TestBranch").call();
insertAndAdd(points2);
geogig.command(CommitOp.class).call();
geogig.command(CheckoutOp.class).setSource("TestBranch").call();
insertAndAdd(points2);
RevCommit branchCommit = geogig.command(CommitOp.class).call();
geogig.command(CheckoutOp.class).setSource("master").call();
MergeScenarioReport conflicts = geogig.command(ReportCommitConflictsOp.class).setCommit(branchCommit).call();
assertEquals(0, conflicts.getConflicts().size());
assertEquals(0, conflicts.getUnconflicted().size());
}
use of org.locationtech.geogig.api.plumbing.merge.MergeScenarioReport in project GeoGig by boundlessgeo.
the class ReportCommitConflictsOpTest method testModifiedSameAttributeCompatible.
@Test
public void testModifiedSameAttributeCompatible() throws Exception {
insertAndAdd(points1);
geogig.command(CommitOp.class).call();
geogig.command(BranchCreateOp.class).setName("TestBranch").call();
Feature points1Modified = feature(pointsType, idP1, "StringProp1_2", new Integer(1000), "POINT(1 1)");
insertAndAdd(points1Modified);
geogig.command(CommitOp.class).call();
geogig.command(CheckoutOp.class).setSource("TestBranch").call();
Feature points1ModifiedB = feature(pointsType, idP1, "StringProp1_2", new Integer(2000), "POINT(1 1)");
insertAndAdd(points1ModifiedB);
RevCommit branchCommit = geogig.command(CommitOp.class).call();
geogig.command(CheckoutOp.class).setSource("master").call();
MergeScenarioReport conflicts = geogig.command(ReportCommitConflictsOp.class).setCommit(branchCommit).call();
assertEquals(0, conflicts.getConflicts().size());
assertEquals(1, conflicts.getUnconflicted().size());
}
use of org.locationtech.geogig.api.plumbing.merge.MergeScenarioReport in project GeoGig by boundlessgeo.
the class ReportCommitConflictsOpTest method testRemovedSameFeature.
@Test
public void testRemovedSameFeature() throws Exception {
insertAndAdd(points1);
geogig.command(CommitOp.class).call();
geogig.command(BranchCreateOp.class).setName("TestBranch").call();
deleteAndAdd(points1);
geogig.command(CommitOp.class).call();
geogig.command(CheckoutOp.class).setSource("TestBranch").call();
deleteAndAdd(points1);
RevCommit branchCommit = geogig.command(CommitOp.class).call();
geogig.command(CheckoutOp.class).setSource("master").call();
MergeScenarioReport conflicts = geogig.command(ReportCommitConflictsOp.class).setCommit(branchCommit).call();
assertEquals(0, conflicts.getConflicts().size());
assertEquals(0, conflicts.getUnconflicted().size());
}
use of org.locationtech.geogig.api.plumbing.merge.MergeScenarioReport in project GeoGig by boundlessgeo.
the class ReportCommitConflictsOpTest method testModifiedSameFeatureIncompatible.
@Test
public void testModifiedSameFeatureIncompatible() throws Exception {
insertAndAdd(points1);
geogig.command(CommitOp.class).call();
geogig.command(BranchCreateOp.class).setName("TestBranch").call();
Feature points1Modified = feature(pointsType, idP1, "StringProp1_2", new Integer(1000), "POINT(1 1)");
insertAndAdd(points1Modified);
geogig.command(CommitOp.class).call();
geogig.command(CheckoutOp.class).setSource("TestBranch").call();
Feature points1ModifiedB = feature(pointsType, idP1, "StringProp1_3", new Integer(1000), "POINT(1 1)");
insertAndAdd(points1ModifiedB);
RevCommit branchCommit = geogig.command(CommitOp.class).call();
geogig.command(CheckoutOp.class).setSource("master").call();
MergeScenarioReport conflicts = geogig.command(ReportCommitConflictsOp.class).setCommit(branchCommit).call();
assertEquals(1, conflicts.getConflicts().size());
assertEquals(0, conflicts.getUnconflicted().size());
}
Aggregations