@Test
void shouldScanAllLinesAndAssignLineNumberAndFileName() {

    DynamicLineParser parser = new DynamicLineParser("^(.*)$", 
            "return builder.setFileName(fileName).setLineStart(lineNumber).setMessage(matcher.group(1)).buildOptional()");
    Report report = parser.parse(createReaderFactory(FILE_NAME));
    
    assertThat(report).hasSize(3);
    for (int i = 0; i < 3; i++) {
        assertThat(report.get(i)).hasBaseName(FILE_NAME).hasLineStart(i + 1).hasMessage(String.valueOf(i + 1));
    }
}