コード例 #1
0
 /**
  * @see getLabSpecimenTemplate(Integer labSpecimenTemplateId)
  * @verifies get LabSpecimenTemplaten by LabSpecimenTemplateId
  */
 @Test
 @SkipBaseSetup
 public void getLabSpecimenTemplate_shouldGetLabSpecimenTemplate() throws Exception {
   LabSpecimenTemplate labSpecimenTemplate =
       Context.getService(LabCatalogService.class).getLabSpecimenTemplate(33333001);
   Assert.assertNotNull("getLabSpecimenTemplate should not return null", labSpecimenTemplate);
   Assert.assertEquals(
       "getLabSpecimenTemplate should return the right object",
       "35442792-49b7-11e1-812a-0024e8c61285",
       labSpecimenTemplate.getUuid());
 }
コード例 #2
0
 /**
  * @see retireLabSpecimenTemplate(LabSpecimenTemplate labSpecimenTemplate, String reason)
  * @verifies retire LabSpecimenTemplate
  */
 @Test
 @SkipBaseSetup
 public void retireLabSpecimenTemplate_shouldRetireLabSpecimenTemplate() throws Exception {
   LabSpecimenTemplate labSpecimenTemplate =
       Context.getService(LabCatalogService.class)
           .getLabSpecimenTemplateByUuid("35442792-49b7-11e1-812a-0024e8c61285");
   Context.getService(LabCatalogService.class).retireLabSpecimenTemplate(labSpecimenTemplate, "");
   labSpecimenTemplate =
       Context.getService(LabCatalogService.class)
           .getLabSpecimenTemplateByUuid("35442792-49b7-11e1-812a-0024e8c61285");
   Assert.assertNotNull("retireLabSpecimenTemplate should not return null", labSpecimenTemplate);
   Assert.assertEquals(
       "retireLabSpecimenTemplate should return the right object with voided true",
       "true",
       labSpecimenTemplate.getRetired().toString());
 }
コード例 #3
0
 /**
  * @see LabCatalogService#saveLabSpecimenTemplate(LabSpecimenTemplate labSpecimenTemplate)
  * @verifies save LabSpecimenTemplate
  */
 @Test
 @SkipBaseSetup
 public void saveLabSpecimenTemplate_shouldSaveRecord() throws Exception {
   LabSpecimenTemplate labSpecimenTemplate =
       Context.getService(LabCatalogService.class)
           .getLabSpecimenTemplateByUuid("35442792-49b7-11e1-812a-0024e8c61285");
   labSpecimenTemplate.setUuid("12312312-1231-1231-1231-123123123");
   Context.getService(LabCatalogService.class).saveLabSpecimenTemplate(labSpecimenTemplate);
   labSpecimenTemplate =
       Context.getService(LabCatalogService.class)
           .getLabSpecimenTemplateByUuid("12312312-1231-1231-1231-123123123");
   Assert.assertNotNull("getLabPreconditionByUuid should not return null", labSpecimenTemplate);
   Assert.assertEquals(
       "getLabPreconditionByUuid should return the right object",
       "12312312-1231-1231-1231-123123123",
       labSpecimenTemplate.getUuid());
 }