@Test public void testWithSectionWithoutHeader() { Section section = new Section(0); Paragraph paragraph = new Paragraph(); paragraph.appendSentence("it like a piece of a cake.", 0); section.appendParagraph(paragraph); List<ValidationError> errors = new ArrayList<>(); validator.setErrorList(errors); validator.validate(section); assertEquals(1, errors.size()); }
@BeforeClass public static void setUp() { validator = new SectionLengthValidator(); validator.setMaxSectionLength(10); }