@Test public void loadTwoConfiguration() throws StyleCheckerException, IOException { String configFilePath = "src/test/resources/stylechecker/WildCardAllow.json"; JsonConfigurationLoader loader = new JsonConfigurationLoader(); Configuration config = loader.loadFileConfiguration(configFilePath); String methodNameFormatValue = config.getAttribute(StyleName.METHOD_NAME_FORMAT); assertEquals(methodNameFormatValue, StyleName.IGNORE_STYLE); String wildCardValue = config.getAttribute(StyleName.WILD_CARD_IMPORT); assertEquals(wildCardValue, StyleName.WILD_CARD_IMPORT_OK); }
@Override public Configuration loadFileConfiguration(String filePath) throws IOException { File configurationFile = new File(filePath); String configurationJson = FileUtils.readFileToString(configurationFile); return loadJsonConfiguration(configurationJson); }
JsonConfigurationLoader implements ConfigurationLoader { @Override public Configuration loadFileConfiguration(String filePath) throws IOException { File configurationFile = new File(filePath); String configurationJson = FileUtils.readFileToString(configurationFile); return loadJsonConfiguration(configurationJson); } }
JsonConfigurationLoader implements ConfigurationLoader { @Override public Configuration loadFileConfiguration(String filePath) throws IOException { File configurationFile = new File(filePath); String configurationJson = FileUtils.readFileToString(configurationFile); return loadJsonConfiguration(configurationJson); }  }
JsonConfigurationLoader implements ConfigurationLoader { @Override public Configuration loadFileConfiguration(String filePath) throws IOException { File configurationFile = new File(filePath); String configurationJson = FileUtils.readFileToString(configurationFile); return loadJsonConfiguration(configurationJson); }  @Override Configuration loadFileConfiguration(String filePath); @Override Configuration loadJsonConfiguration(String json); }
JsonConfigurationLoader implements ConfigurationLoader { @Override public Configuration loadFileConfiguration(String filePath) throws IOException { File configurationFile = new File(filePath); String configurationJson = FileUtils.readFileToString(configurationFile); return loadJsonConfiguration(configurationJson); }  @Override Configuration loadFileConfiguration(String filePath); @Override Configuration loadJsonConfiguration(String json);  }