Пример #1
0
  private void test(boolean saveReference)
      throws FileNotFoundException, OfxInternalProcessingException {
    logger.debug(fTest.getAbsolutePath());
    String wikiTxt = StringIO.loadTxt(fTest);

    Section section = wikiInline.toOfx(wikiTxt);
    if (saveReference) {
      JaxbUtil.save(fRef, section, true);
    } else {
      Section sectionRef = (Section) JaxbUtil.loadJAXB(fRef.getAbsolutePath(), Section.class);
      Assert.assertEquals(JaxbUtil.toString(sectionRef), JaxbUtil.toString(section));
    }
  }
Пример #2
0
  private void table(Aht athStatus, Aht ahtParents, String srcXml, String dstXml, int... colWidths)
      throws UtilsConfigurationException {
    try {
      logger.info(srcXml);
      OfxStatusTableFactory fOfx = new OfxStatusTableFactory(config, langs, translations);
      fOfx.setColWidths(colWidths);

      if (ahtParents != null) {
        fOfx.activateParents(ahtParents);
      }
      //			fOfx.renderColumn(Code.icon, withIcon);

      Table table = fOfx.buildLatexTable(srcXml.replaceAll("/", "."), athStatus);
      JaxbUtil.save(new File(dstXml), table, true);
    } catch (OfxAuthoringException e) {
      throw new UtilsConfigurationException(e.getMessage());
    }
  }