@Test void testEmptyValidator() throws RedPenException { List<Document> documents = new ArrayList<>(); documents.add(Document.builder() .addSection(1) .addParagraph() .addSentence(new Sentence("In a land far away, there once was as a hungry programmer.", 1)) .addSentence(new Sentence("He was hungry for programming and programmed all day - " + " - in Java, Python, C++, etc.", 2)) .addSentence(new Sentence("Whe he wasn't programming, he was eating noodles.", 3)) .addParagraph() .addSentence(new Sentence("One day while programming, he got a new idea.", 4)) .build()); Configuration configuration = Configuration.builder().build(); RedPen redPen = new RedPen(configuration); Map<Document, List<ValidationError>> errors = redPen.validate(documents); assertEquals(0, errors.get(documents.get(0)).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; }