@Test void shouldCreateFileNameAsLink() { FileNameRenderer renderer = createRenderer(true); Issue issue = new IssueBuilder().setFileName("/path/to/affected/file.txt").setLineStart(20).build(); assertThat(renderer.renderAffectedFileLink(issue)).matches("<a href=\"source\\.[0-9a-f-]+/#20\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"/path/to/affected/file.txt\">file.txt:20</a>"); assertThat(renderer.renderAffectedFileLink(issue)).contains(issue.getId().toString()); }
public String renderAffectedFileLink(final Issue issue) { return createAffectedFileLink(issue).render(); }
FileNameRenderer { public String renderAffectedFileLink(final Issue issue) { return createAffectedFileLink(issue).render(); } }
FileNameRenderer { public String renderAffectedFileLink(final Issue issue) { return createAffectedFileLink(issue).render(); } FileNameRenderer(final Run<?, ?> build); @VisibleForTesting  FileNameRenderer(final Run<?, ?> build, final BuildFolderFacade facade); }
FileNameRenderer { public String renderAffectedFileLink(final Issue issue) { return createAffectedFileLink(issue).render(); } FileNameRenderer(final Run<?, ?> build); @VisibleForTesting  FileNameRenderer(final Run<?, ?> build, final BuildFolderFacade facade); String renderAffectedFileLink(final Issue issue); DomContent createAffectedFileLink(final Issue issue); DomContent createAffectedFileLink(final Issue issue, final String prefix); String getSourceCodeUrl(final Issue issue); String getFileNameAtLine(final Issue issue); String getFileName(final Issue issue); }
FileNameRenderer { public String renderAffectedFileLink(final Issue issue) { return createAffectedFileLink(issue).render(); } FileNameRenderer(final Run<?, ?> build); @VisibleForTesting  FileNameRenderer(final Run<?, ?> build, final BuildFolderFacade facade); String renderAffectedFileLink(final Issue issue); DomContent createAffectedFileLink(final Issue issue); DomContent createAffectedFileLink(final Issue issue, final String prefix); String getSourceCodeUrl(final Issue issue); String getFileNameAtLine(final Issue issue); String getFileName(final Issue issue);  }