示例#1
0
文件: RemoveTest.java 项目: NCIP/psc
 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());
 }
示例#2
0
文件: RemoveTest.java 项目: NCIP/psc
 public void testGetChildUsesDirectAttributeIfNoDomainObject() throws Exception {
   remove.setChild(null);
   remove.setChildId(5);
   assertEquals(5, (int) remove.getChildId());
 }
示例#3
0
文件: RemoveTest.java 项目: NCIP/psc
 public void testSetChildIdClearsChildIfIdsDoNotMatch() throws Exception {
   remove.setChild(setId(3, new StudySegment()));
   remove.setChildId(15);
   assertNull("New child not cleared", remove.getChild());
 }
示例#4
0
文件: RemoveTest.java 项目: NCIP/psc
 public void testGetChildIdPassesThroughFromDomainObject() throws Exception {
   Epoch child = setId(4, new Epoch());
   remove.setChildId(17);
   remove.setChild(child);
   assertEquals(4, (int) remove.getChildId());
 }