예제 #1
0
 @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());
 }
예제 #2
0
 @BeforeClass
 public static void setUp() {
   validator = new SectionLengthValidator();
   validator.setMaxSectionLength(10);
 }