Ejemplo n.º 1
0
 public static void testItems(String myPath, String[] myDocs) {
   AuthoringHelperTest ah = new AuthoringHelperTest();
   // String sep = "\\";
   for (int i = 0; i < myDocs.length; i++) {
     String path = myPath + File.separator + myDocs[i];
     log.info("Testing XML file:" + path);
     Document document = XmlUtil.readDocument(myPath + File.separator + myDocs[i]);
     if (document == null) log.info("DOCUMENT IS NULL");
     if (document != null) log.info("DOCUMENT EXISTS.");
     log.info("Created doc.");
     ItemFacade it = ah.createImportedItem(document);
     log.info("Created item: " + it.getItemTextArray());
   }
 }
Ejemplo n.º 2
0
 public static void testAssessments(String myPath, String[] myDocs) {
   AuthoringHelperTest ah = new AuthoringHelperTest();
   // String sep = "\\";
   for (int i = 0; i < myDocs.length; i++) {
     String path = myPath + File.separator + myDocs[i];
     log.info("Testing XML file:" + path);
     Document document = XmlUtil.readDocument(myPath + File.separator + myDocs[i]);
     log.info("Created doc.");
     AssessmentFacade a = ah.createImportedAssessment(document);
     log.info("Created assessment title: " + a.getTitle());
     log.info("Created assessment comments: " + a.getComments());
     log.info("Created assessment desc: " + a.getDescription());
     log.info("Created assessment mod: " + a.getLastModifiedBy());
     log.info("Created assessment date: " + a.getLastModifiedDate());
   }
 }