public void testSetChildIdKeepsChildIfIdsMatch() throws Exception { StudySegment expectedChild = setId(15, new StudySegment()); remove.setChild(expectedChild); remove.setChildId(expectedChild.getId()); assertSame("New child incorrectly cleared", expectedChild, remove.getChild()); }
public void testSetChildIdClearsChildIfIdsDoNotMatch() throws Exception { remove.setChild(setId(3, new StudySegment())); remove.setChildId(15); assertNull("New child not cleared", remove.getChild()); }