예제 #1
0
파일: RemoveTest.java 프로젝트: NCIP/psc
  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());
  }
예제 #2
0
파일: RemoveTest.java 프로젝트: NCIP/psc
  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());
  }