@Test public void testReadWriteConflicts() throws Exception { Conflict conflict = new Conflict(idP1, RevObjectTestSupport.hashString("ancestor"), RevObjectTestSupport.hashString("ours"), RevObjectTestSupport.hashString("theirs")); Conflict conflict2 = new Conflict(idP2, RevObjectTestSupport.hashString("ancestor2"), RevObjectTestSupport.hashString("ours2"), RevObjectTestSupport.hashString("theirs2")); ArrayList<Conflict> conflicts = Lists.newArrayList(conflict, conflict2); geogig.command(ConflictsWriteOp.class).setConflicts(conflicts).call(); Set<Conflict> returnedConflicts = Sets .newHashSet(geogig.command(ConflictsQueryOp.class).call()); assertEquals(Sets.newHashSet(conflicts), returnedConflicts); }
@Test public void testReadWriteConflicts() throws Exception { Conflict conflict = new Conflict(idP1, RevObjectTestSupport.hashString("ancestor"), RevObjectTestSupport.hashString("ours"), RevObjectTestSupport.hashString("theirs")); Conflict conflict2 = new Conflict(idP2, RevObjectTestSupport.hashString("ancestor2"), RevObjectTestSupport.hashString("ours2"), RevObjectTestSupport.hashString("theirs2")); ArrayList<Conflict> conflicts = Lists.newArrayList(conflict, conflict2); geogig.command(ConflictsWriteOp.class).setConflicts(conflicts).call(); Set<Conflict> returnedConflicts = Sets .newHashSet(geogig.command(ConflictsQueryOp.class).call()); assertEquals(Sets.newHashSet(conflicts), returnedConflicts); }