@Test void testSpecifiedErrorLevelComeInErrors() throws RedPenException { String sampleConfigString = "<redpen-conf lang=\"ja\">" + "<validators>" + "<validator name=\"SentenceLength\" level=\"INFO\" />" + "</validators>" + "</redpen-conf>"; Configuration config = new ConfigurationLoader().loadFromString(sampleConfigString); List<Document> documents = new ArrayList<>();documents.add( Document.builder() .addSection(1) .addParagraph() .addSentence(new Sentence("This is a long long long long long long long long long long long long long long long long long long long long long long long long sentence", 1)) .build()); RedPen redPen = new RedPen(config); Map<Document, List<ValidationError>> errors = redPen.validate(documents, "info"); assertEquals(1, errors.get(documents.get(0)).size()); assertEquals(ValidatorConfiguration.LEVEL.INFO, errors.get(documents.get(0)).get(0).getLevel()); }
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();  }