Пример #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());
 }
Пример #2
0
 public void initializeConfigFile() throws IOException {
   FileUtils.deleteQuietly(passwordFile);
   writeXmlToConfigFile(ConfigMigrator.migrate(originalXml));
 }