AgendaItemBo implements AgendaItemDefinitionContract, Versioned, Serializable { public static AgendaItemBo from(AgendaItemDefinition im) { if (im == null) { return null; } AgendaItemBo bo = new AgendaItemBo(); bo.id = im.getId(); bo.agendaId = im.getAgendaId(); bo.subAgendaId = im.getSubAgendaId(); bo.whenTrueId = im.getWhenTrueId(); bo.whenFalseId = im.getWhenFalseId(); bo.alwaysId = im.getAlwaysId(); bo.versionNumber = im.getVersionNumber(); bo.rule = RuleBo.from(im.getRule()); bo.whenTrue = AgendaItemBo.from(im.getWhenTrue()); bo.whenFalse = AgendaItemBo.from(im.getWhenFalse()); bo.always = AgendaItemBo.from(im.getAlways()); return bo; }  String getUl(AgendaItemBo firstItem); String getUlHelper(AgendaItemBo item); String getRuleText(); List<AgendaItemBo> getAlwaysList(); @Override String getId(); void setId(String id); @Override String getAgendaId(); void setAgendaId(String agendaId); @Override String getRuleId(); @Override String getSubAgendaId(); void setSubAgendaId(String subAgendaId); @Override String getWhenTrueId(); void setWhenTrueId(String whenTrueId); @Override String getWhenFalseId(); void setWhenFalseId(String whenFalseId); @Override String getAlwaysId(); void setAlwaysId(String alwaysId); @Override Long getVersionNumber(); void setVersionNumber(Long versionNumber); @Override AgendaItemBo getWhenTrue(); void setWhenTrue(AgendaItemBo whenTrue); @Override AgendaItemBo getWhenFalse(); void setWhenFalse(AgendaItemBo whenFalse); @Override AgendaItemBo getAlways(); void setAlways(AgendaItemBo always); @Override RuleBo getRule(); @Override AgendaDefinitionContract getSubAgenda(); void setRule(RuleBo rule); static AgendaItemBo from(AgendaItemDefinition im); AgendaItemBo copyAgendaItem(AgendaBo copiedAgenda, Map<String, RuleBo> oldRuleIdToNew, Map<String, AgendaItemBo> oldAgendaItemIdToNew, List<AgendaItemBo> copiedAgendaItems, final String dts); DataObjectService getDataObjectService(); void setDataObjectService(DataObjectService dataObjectService); KrmsTypeRepositoryService getKrmsTypeRepositoryService(); void setKrmsTypeRepositoryService(KrmsTypeRepositoryService dataObjectService); static final String COPY_OF_TEXT; static final String AGENDA_ITEM_SEQ_NAME; }
@Test public void testFromNullParameter() { assertNull(testObject.from(null)); }
@Test public void testFrom() { AgendaItemBo data = testObject.from(getAgendItemDefinitionBuilder()); assertEquals("A",data.getId()); assertEquals("B",data.getAgendaId()); assertEquals("H",data.getRuleId()); assertEquals("D",data.getSubAgendaId()); assertEquals("Q",data.getWhenTrueId()); assertEquals("S",data.getWhenFalseId()); assertEquals("U",data.getAlwaysId()); assertEquals(0L,(long)data.getVersionNumber()); assertNotNull(data.getRule()); assertNotNull(data.getWhenTrue()); assertNotNull(data.getWhenFalse()); assertNotNull(data.getAlways()); }