public static void main(String[] args)
      throws FileNotFoundException, OfxConfigurationException, OfxInternalProcessingException {
    LoggerInit loggerInit = new LoggerInit("log4j.xml");
    loggerInit.addAltPath("src/test/resources/config");
    loggerInit.init();
    JaxbUtil.setNsPrefixMapper(new OfxNsPrefixMapper());

    boolean saveReference = true;
    int id = -1;
    int index = 0;

    TestWikiInlineProcessor.initCmp();
    for (Object[] o : TestWikiInlineProcessor.initFileNames()) {
      File fTest = (File) o[0];

      TestWikiInlineProcessor test = new TestWikiInlineProcessor(fTest);
      test.init();
      logger.trace(id + " " + index);
      if (id < 0 | id == index) {
        test.test(saveReference);
      }
      test.close();
      index++;
    }
  }
  public static Configuration init() {
    AbstractAhtUtilTest.setfTarget(new File("target"));

    LoggerInit loggerInit = new LoggerInit("log4j.xml");
    loggerInit.addAltPath("config.ahtutils-util.test");
    loggerInit.init();

    JaxbUtil.setNsPrefixMapper(new AhtUtilsNsPrefixMapper());

    try {
      String cfn = ExlpCentralConfigPointer.getFile("utils", "util").getAbsolutePath();
      ConfigLoader.add(cfn);
      logger.info("Using additional config in: " + cfn);
    } catch (ExlpConfigurationException e) {
      logger.debug(
          "No additional "
              + ExlpCentralConfigPointer.class.getSimpleName()
              + " because "
              + e.getMessage());
    }

    Configuration config = ConfigLoader.init();

    logger.debug("Config and Logger initialized");
    return config;
  }
Example #3
0
  public static void main(String args[]) throws Exception {
    JaxbUtil.setNsPrefixMapper(new OtrCastNsPrefixMapper());

    UtilsCliOption uOption =
        new UtilsCliOption(
            de.kisner.otrcast.api.Version.class.getPackage().getImplementationVersion());
    uOption.setLog4jPaths("otrcast-app/config");

    OtrCastClient otrMc = new OtrCastClient(uOption);
    try {
      otrMc.parseArguments(args);
    } catch (ParseException e) {
      logger.error(e.getMessage());
      uOption.help();
    } catch (OtrConfigurationException e) {
      logger.error(e.getMessage());
      uOption.help();
    } catch (UtilsProcessingException e) {
      e.printStackTrace();
    }
  }
Example #4
0
  public static Configuration init(String configFile) {
    LoggerInit loggerInit = new LoggerInit("log4j.xml");
    loggerInit.addAltPath("config.ofx-util.test");
    loggerInit.init();
    JaxbUtil.setNsPrefixMapper(new OfxNsPrefixMapper());

    try {
      String cfn = ExlpCentralConfigPointer.getFile("ofx", "core").getAbsolutePath();
      ConfigLoader.add(cfn);
      logger.info("Using additional config in: " + cfn);
    } catch (ExlpConfigurationException e) {
      logger.warn(
          "No additional "
              + ExlpCentralConfigPointer.class.getSimpleName()
              + ": "
              + e.getMessage());
    }
    ConfigLoader.add(configFile);
    Configuration config = ConfigLoader.init();
    logger.debug("Config and Logger initialized");

    return config;
  }
 @BeforeClass
 public static void initPrefixMapper() {
   JaxbUtil.setNsPrefixMapper(new AhtUtilsNsPrefixMapper());
 }