예제 #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);
 }