@Test void testDuplicatedValidatorConfiguration() throws RedPenException{ String sampleConfigString = "<redpen-conf lang=\"ja\">" + "<validators>" + "<validator name=\"SentenceLength\">" + "<property name=\"max_length\" value=\"200\" />" + "</validator>" + "<validator name=\"SentenceLength\">" + "<property name=\"max_length\" value=\"300\" />" + "</validator>" + "</validators>" + "<symbols>" + "<symbol name=\"EXCLAMATION_MARK\" value=\"！\" invalid-chars=\"!\" after-space=\"true\" />" + "</symbols>" + "</redpen-conf>"; Configuration configuration = new ConfigurationLoader().loadFromString(sampleConfigString); assertNotNull(configuration); assertEquals(1, configuration.getValidatorConfigs().size()); assertEquals("SentenceLength", configuration.getValidatorConfigs().get(0).getConfigurationName()); assertEquals("300", configuration.getValidatorConfigs().get(0).getProperty("max_length")); }
public Configuration loadFromString(String configString) throws RedPenException { return loadFromString(configString, null); }
ConfigurationLoader { public Configuration loadFromString(String configString) throws RedPenException { return loadFromString(configString, null); } }
ConfigurationLoader { public Configuration loadFromString(String configString) throws RedPenException { return loadFromString(configString, null); }  }
ConfigurationLoader { public Configuration loadFromString(String configString) throws RedPenException { return loadFromString(configString, null); }  Configuration load(File configFile); Configuration loadFromResource(String resourcePath); Configuration loadFromResource(String resourcePath, File base); Configuration loadFromString(String configString); Configuration loadFromString(String configString, File base); Configuration load(InputStream stream); Configuration load(InputStream stream, File base); ConfigurationLoader secure(); }
ConfigurationLoader { public Configuration loadFromString(String configString) throws RedPenException { return loadFromString(configString, null); }  Configuration load(File configFile); Configuration loadFromResource(String resourcePath); Configuration loadFromResource(String resourcePath, File base); Configuration loadFromString(String configString); Configuration loadFromString(String configString, File base); Configuration load(InputStream stream); Configuration load(InputStream stream, File base); ConfigurationLoader secure();  }