示例#1
0
文件: RemoveTest.java 项目: NCIP/psc
  public void testMergeWithEquivalentRemovePresent() throws Exception {
    Remove expectedRemove = Remove.create(ssb);
    delta.addChange(expectedRemove);

    remove.setChild(ssb);
    remove.mergeInto(delta, NOW);

    assertEquals("Duplicate remove should not have been added", 1, delta.getChanges().size());
    assertEquals(expectedRemove, delta.getChanges().get(0));
  }
示例#2
0
文件: RemoveTest.java 项目: NCIP/psc
 public void testEqualsWhenRemoveHasDifferentChild() throws Exception {
   Remove remove1 = Remove.create(createNamedInstance("Epoch1", Epoch.class));
   Remove remove2 = Remove.create(createNamedInstance("Segment2", StudySegment.class));
   assertNotEquals("Removes are equals", remove1, remove2);
 }
示例#3
0
文件: RemoveTest.java 项目: NCIP/psc
  public void testDeepEqualsWhenRemoveHasDifferentChild() throws Exception {
    Remove remove1 = Remove.create(setGridId("e1", Epoch.create("E1")));
    Remove remove2 = Remove.create(setGridId("e2", Epoch.create("E2")));

    assertDifferences(remove1.deepEquals(remove2), "for different child");
  }
示例#4
0
文件: RemoveTest.java 项目: NCIP/psc
 public void testEqualsWhenRemoveHasSameChild() throws Exception {
   Remove remove1 = Remove.create(createNamedInstance("Segment1", StudySegment.class));
   Remove remove2 = Remove.create(createNamedInstance("Segment1", StudySegment.class));
   assertEquals("Removes are not equals", remove1, remove2);
 }