public void testUpdateProcedure() throws Exception { LabProcedureBean lp = new LabProcedureBean(); lp.setLoinc("10763-1"); lp.setCommentary(""); lp.setOvID(902L); lp.setPid(2L); lp.setResults(""); lp.allow(); lp.statusInTransit(); lp.setLTID(5000000005L); long id = lpDAO.addLabProcedure(lp); lp.setProcedureID(id); LabProcedureBean procedures = lpDAO.getLabProcedure(id); List<LabProcedureBean> beans = action.viewInTransitProcedures(5000000005L); assertEquals(1, beans.size()); LabProcedureBean lpBean = beans.get(0); assertEquals(procedures.getLoinc(), lpBean.getLoinc()); assertEquals(procedures.getOvID(), lpBean.getOvID()); assertEquals(procedures.getLoinc(), lpBean.getLoinc()); assertEquals("In Transit", lpBean.getStatus()); assertEquals(procedures.getProcedureID(), lpBean.getProcedureID()); }
/** * testSubmitReceived * * @throws Exception */ public void testSubmitReceived() throws Exception { LabProcedureBean lp = new LabProcedureBean(); lp.setLoinc("10763-1"); lp.setCommentary(""); lp.setOvID(902L); lp.setPid(2L); lp.setResults(""); lp.allow(); lp.statusInTransit(); lp.setLTID(5000000005L); long id = lpDAO.addLabProcedure(lp); lp.setProcedureID(id); assertTrue(action.submitReceived("" + id)); LabProcedureBean procedures = lpDAO.getLabProcedure(id); assertEquals("Received", procedures.getStatus()); }