@Test void shouldConvertReport() { Report report = new Report(); IssueBuilder builder = new IssueBuilder(); builder.setDirectory(WORKSPACE); report.add(builder.setFileName(TXT_FILE).setLineStart(1).build()); report.add(builder.setFileName(JAVA_FILE).setLineStart(10).build()); FileLocations twoFiles = new ReportLocations().toFileLocations(report); assertThat(twoFiles.getFiles()).containsExactlyInAnyOrder(absolute(TXT_FILE), absolute(JAVA_FILE)); assertThat(twoFiles.getLines(absolute(TXT_FILE))).containsExactly(1); assertThat(twoFiles.getLines(absolute(JAVA_FILE))).containsExactly(10); }
public FileLocations toFileLocations(final Report report) { FileLocations fileLocations = new FileLocations(); report.stream().forEach(i -> fileLocations.addLine(i.getFileName(), i.getLineStart())); return fileLocations; }
ReportLocations { public FileLocations toFileLocations(final Report report) { FileLocations fileLocations = new FileLocations(); report.stream().forEach(i -> fileLocations.addLine(i.getFileName(), i.getLineStart())); return fileLocations; } }
ReportLocations { public FileLocations toFileLocations(final Report report) { FileLocations fileLocations = new FileLocations(); report.stream().forEach(i -> fileLocations.addLine(i.getFileName(), i.getLineStart())); return fileLocations; }  }
ReportLocations { public FileLocations toFileLocations(final Report report) { FileLocations fileLocations = new FileLocations(); report.stream().forEach(i -> fileLocations.addLine(i.getFileName(), i.getLineStart())); return fileLocations; }  FileLocations toFileLocations(final Report report); @Deprecated FileLocations toFileLocations(final Report report, @SuppressWarnings("unused") final String workspace); }
ReportLocations { public FileLocations toFileLocations(final Report report) { FileLocations fileLocations = new FileLocations(); report.stream().forEach(i -> fileLocations.addLine(i.getFileName(), i.getLineStart())); return fileLocations; }  FileLocations toFileLocations(final Report report); @Deprecated FileLocations toFileLocations(final Report report, @SuppressWarnings("unused") final String workspace);  }