@Test void testClearCachedInnerProperties() throws RedPenException { List<Document> documents = new ArrayList<>(); documents.add(Document.builder() .addSection(1) .addSectionHeader("this is it.") .addParagraph() .addSentence(new Sentence("Hello and this is it", 1)) .build()); Configuration configuration = Configuration.builder() .addValidatorConfig(new ValidatorConfiguration("DuplicatedSection")) .build(); RedPen redPen = new RedPen(configuration); List<ValidationError> errors = redPen.validate(documents).get(documents.get(0)); assertEquals(0, errors.size()); documents.clear(); documents.add(Document.builder() .addSection(1) .addSectionHeader("this is it.") .addParagraph() .addSentence(new Sentence("Hello and this is it", 1)) .build()); errors = redPen.validate(documents).get(documents.get(0)); assertEquals(0, errors.size()); }
public Map<Document, List<ValidationError>> validate(List<Document> documents) { return validate(documents, "error"); }
RedPen { public Map<Document, List<ValidationError>> validate(List<Document> documents) { return validate(documents, "error"); } }
RedPen { public Map<Document, List<ValidationError>> validate(List<Document> documents) { return validate(documents, "error"); } RedPen(File configFile);  RedPen(String configPath);  RedPen(Configuration configuration); }
RedPen { public Map<Document, List<ValidationError>> validate(List<Document> documents) { return validate(documents, "error"); } RedPen(File configFile);  RedPen(String configPath);  RedPen(Configuration configuration); Document parse(DocumentParser parser, InputStream InputStream); Document parse(DocumentParser parser, String content); List<Document> parse(DocumentParser parser, File[] files); Map<Document, List<ValidationError>> validate(List<Document> documents); Map<Document, List<ValidationError>> validate(List<Document> documents, String threshold); List<ValidationError> validate(Document document); List<Validator> getValidators(); Configuration getConfiguration(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
RedPen { public Map<Document, List<ValidationError>> validate(List<Document> documents) { return validate(documents, "error"); } RedPen(File configFile);  RedPen(String configPath);  RedPen(Configuration configuration); Document parse(DocumentParser parser, InputStream InputStream); Document parse(DocumentParser parser, String content); List<Document> parse(DocumentParser parser, File[] files); Map<Document, List<ValidationError>> validate(List<Document> documents); Map<Document, List<ValidationError>> validate(List<Document> documents, String threshold); List<ValidationError> validate(Document document); List<Validator> getValidators(); Configuration getConfiguration(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static final String VERSION; }