@Test public void loadCommandConfigurationWrongCommand() throws Exception { ConfigurationLoader loader = new ConfigurationLoader(); CommandConfiguration commandConfiguration = loader.loadCommandConfiguration(SEARCH_COMMAND_FULL + "/"); Assert.assertTrue(commandConfiguration.getName() == null); }
public CommandConfiguration loadCommandConfiguration(String fullCommand) { Configuration configuration = loadXmlConfiguration(COMMAND_XML_CONFIG); String name = configuration.getString(fullCommand + COMMAND_NAME_PROPERTY); String url = configuration.getString(fullCommand + COMMAND_URL_PROPERTY); String type = configuration.getString(fullCommand + COMMAND_TYPE_PROPERTY); return new CommandConfiguration(name, url, type); }
ConfigurationLoader { public CommandConfiguration loadCommandConfiguration(String fullCommand) { Configuration configuration = loadXmlConfiguration(COMMAND_XML_CONFIG); String name = configuration.getString(fullCommand + COMMAND_NAME_PROPERTY); String url = configuration.getString(fullCommand + COMMAND_URL_PROPERTY); String type = configuration.getString(fullCommand + COMMAND_TYPE_PROPERTY); return new CommandConfiguration(name, url, type); } }
ConfigurationLoader { public CommandConfiguration loadCommandConfiguration(String fullCommand) { Configuration configuration = loadXmlConfiguration(COMMAND_XML_CONFIG); String name = configuration.getString(fullCommand + COMMAND_NAME_PROPERTY); String url = configuration.getString(fullCommand + COMMAND_URL_PROPERTY); String type = configuration.getString(fullCommand + COMMAND_TYPE_PROPERTY); return new CommandConfiguration(name, url, type); } ConfigurationLoader(); }
ConfigurationLoader { public CommandConfiguration loadCommandConfiguration(String fullCommand) { Configuration configuration = loadXmlConfiguration(COMMAND_XML_CONFIG); String name = configuration.getString(fullCommand + COMMAND_NAME_PROPERTY); String url = configuration.getString(fullCommand + COMMAND_URL_PROPERTY); String type = configuration.getString(fullCommand + COMMAND_TYPE_PROPERTY); return new CommandConfiguration(name, url, type); } ConfigurationLoader(); Properties loadServerConfiguration(final String configFile); Properties loadCommandProperties(); CommandConfiguration loadCommandConfiguration(String fullCommand); File getConfigFile(); }
ConfigurationLoader { public CommandConfiguration loadCommandConfiguration(String fullCommand) { Configuration configuration = loadXmlConfiguration(COMMAND_XML_CONFIG); String name = configuration.getString(fullCommand + COMMAND_NAME_PROPERTY); String url = configuration.getString(fullCommand + COMMAND_URL_PROPERTY); String type = configuration.getString(fullCommand + COMMAND_TYPE_PROPERTY); return new CommandConfiguration(name, url, type); } ConfigurationLoader(); Properties loadServerConfiguration(final String configFile); Properties loadCommandProperties(); CommandConfiguration loadCommandConfiguration(String fullCommand); File getConfigFile();  }