public void testMergeWithReorderAloneDoesNotCancelReorder() throws Exception { delta.addChange(Reorder.create(ssa, 0, 1)); remove.setChild(ssa); remove.mergeInto(delta, NOW); assertEquals("Remove should not have canceled anything", 2, delta.getChanges().size()); }
public void testMergeWithAddFollowedByReorderCancelsBoth() throws Exception { delta.addChange(Add.create(ssc, 2)); Reorder.create(ssc, 2, 1).mergeInto(delta, NOW); remove.setChild(ssc); remove.mergeInto(delta, NOW); assertEquals("Remove should have canceled add and reorder", 0, delta.getChanges().size()); }