Ejemplo n.º 1
0
 public GoConfigFileHelper(File configFile) {
   assignFileDao(createTestingDao());
   this.configFile = configFile.getAbsoluteFile();
   ConfigMigrator.migrate(this.configFile);
   try {
     this.originalXml = FileUtils.readFileToString(this.configFile, "UTF-8");
   } catch (IOException e) {
     throw bomb("Error reading config file", e);
   }
   new SystemEnvironment()
       .setProperty(SystemEnvironment.CONFIG_FILE_PROPERTY, this.configFile.getAbsolutePath());
 }
Ejemplo n.º 2
0
 public void initializeConfigFile() throws IOException {
   FileUtils.deleteQuietly(passwordFile);
   writeXmlToConfigFile(ConfigMigrator.migrate(originalXml));
 }