Пример #1
0
 @Test
 public void testConvertToPdf() {
   try {
     OdfTextDocument oDoc =
         uk.ac.bbsrc.tgac.miso.core.util.FormUtils.createSampleDeliveryForm(
             generateSamples(), testSampleDeliveryFile, false);
     uk.ac.bbsrc.tgac.miso.core.util.FormUtils.convertToPDF(oDoc);
   } catch (Exception e) {
     e.printStackTrace();
     TestCase.fail();
   }
 }
Пример #2
0
 @Test
 public void testCreateSampleDeliveryForm() {
   try {
     uk.ac.bbsrc.tgac.miso.core.util.FormUtils.createSampleDeliveryForm(
         generateSamples(), testSampleDeliveryFile, true);
   } catch (Exception e) {
     e.printStackTrace();
     TestCase.fail();
   }
 }
Пример #3
0
 @Test
 public void testImportSampleDeliveryForm() {
   try {
     List<Sample> samples =
         uk.ac.bbsrc.tgac.miso.core.util.FormUtils.importSampleDeliveryForm(
             testSampleDeliveryFile);
     int numExpected = generateSamples().size();
     if (samples.size() != numExpected) {
       log.error("Expected samples in: " + numExpected + ". Number imported: " + samples.size());
       TestCase.fail();
     } else {
       log.info("Expected samples in: " + numExpected + ". Number imported: " + samples.size());
     }
   } catch (Exception e) {
     e.printStackTrace();
     TestCase.fail();
   } finally {
     testSampleDeliveryFile.delete();
   }
 }