@Test public void testConfigHelperLoadConfigTO() throws Exception { Config testConfig = TestConfigUtil.createTestLocalConfig(); ConfigTO loadedConfigTO = ConfigHelper.loadConfigTO(testConfig.getLocalDir()); assertNotNull(loadedConfigTO); assertEquals(testConfig.getDisplayName(), loadedConfigTO.getDisplayName()); assertEquals(testConfig.getMachineName(), loadedConfigTO.getMachineName()); assertEquals(testConfig.getMasterKey(), loadedConfigTO.getMasterKey()); TestConfigUtil.deleteTestLocalConfigAndData(testConfig); }
public static ConfigTO loadConfigTO(File localDir) throws ConfigException { File appDir = new File(localDir, Config.DIR_APPLICATION); File configFile = new File(appDir, Config.FILE_CONFIG); if (!configFile.exists()) { throw new ConfigException("Cannot find config file at "+configFile+". Try connecting to a repository using 'connect', or 'init' to create a new one."); } return ConfigTO.load(configFile); }
ConfigHelper { public static ConfigTO loadConfigTO(File localDir) throws ConfigException { File appDir = new File(localDir, Config.DIR_APPLICATION); File configFile = new File(appDir, Config.FILE_CONFIG); if (!configFile.exists()) { throw new ConfigException("Cannot find config file at "+configFile+". Try connecting to a repository using 'connect', or 'init' to create a new one."); } return ConfigTO.load(configFile); } }
ConfigHelper { public static ConfigTO loadConfigTO(File localDir) throws ConfigException { File appDir = new File(localDir, Config.DIR_APPLICATION); File configFile = new File(appDir, Config.FILE_CONFIG); if (!configFile.exists()) { throw new ConfigException("Cannot find config file at "+configFile+". Try connecting to a repository using 'connect', or 'init' to create a new one."); } return ConfigTO.load(configFile); }  }
ConfigHelper { public static ConfigTO loadConfigTO(File localDir) throws ConfigException { File appDir = new File(localDir, Config.DIR_APPLICATION); File configFile = new File(appDir, Config.FILE_CONFIG); if (!configFile.exists()) { throw new ConfigException("Cannot find config file at "+configFile+". Try connecting to a repository using 'connect', or 'init' to create a new one."); } return ConfigTO.load(configFile); }  static Config loadConfig(File localDir); static boolean configExists(File localDir); static ConfigTO loadConfigTO(File localDir); static RepoTO loadRepoTO(File localDir, ConfigTO configTO); static File findLocalDirInPath(File startingPath); }
ConfigHelper { public static ConfigTO loadConfigTO(File localDir) throws ConfigException { File appDir = new File(localDir, Config.DIR_APPLICATION); File configFile = new File(appDir, Config.FILE_CONFIG); if (!configFile.exists()) { throw new ConfigException("Cannot find config file at "+configFile+". Try connecting to a repository using 'connect', or 'init' to create a new one."); } return ConfigTO.load(configFile); }  static Config loadConfig(File localDir); static boolean configExists(File localDir); static ConfigTO loadConfigTO(File localDir); static RepoTO loadRepoTO(File localDir, ConfigTO configTO); static File findLocalDirInPath(File startingPath);  }