@Test public void testEmptyDependencies() throws IOException { final Map<String, MavenArtifact> webappDependencies = Collections.emptyMap(); final StringWriter writer = new StringWriter(); final HtmlDependenciesReport htmlDependenciesReport = new HtmlDependenciesReport( webappDependencies, writer); htmlDependenciesReport.toHtml(); assertNotEmptyAndClear(writer); }
@Override void toHtml() throws IOException { writeBackLink(); writeln("<br/>"); if (dependencies.isEmpty()) { writeln("#Aucune_dependance#"); return; } writeTitle("beans.png", getString("Dependencies")); final HtmlTable table = new HtmlTable(); table.beginTable(getString("Dependencies")); write("<th>Artifact</th><th>#Nom#</th><th>Maven ID</th><th>#Licence#</th>"); for (final Map.Entry<String, MavenArtifact> entry : dependencies.entrySet()) { final String jarFilename = entry.getKey(); final MavenArtifact dependency = entry.getValue(); table.nextRow(); writeDependency(jarFilename, dependency); } table.endTable(); writeln("<div align='right'>" + getFormattedString("nb_dependencies", dependencies.size()) + "</div>"); }
HtmlDependenciesReport extends HtmlAbstractReport { @Override void toHtml() throws IOException { writeBackLink(); writeln("<br/>"); if (dependencies.isEmpty()) { writeln("#Aucune_dependance#"); return; } writeTitle("beans.png", getString("Dependencies")); final HtmlTable table = new HtmlTable(); table.beginTable(getString("Dependencies")); write("<th>Artifact</th><th>#Nom#</th><th>Maven ID</th><th>#Licence#</th>"); for (final Map.Entry<String, MavenArtifact> entry : dependencies.entrySet()) { final String jarFilename = entry.getKey(); final MavenArtifact dependency = entry.getValue(); table.nextRow(); writeDependency(jarFilename, dependency); } table.endTable(); writeln("<div align='right'>" + getFormattedString("nb_dependencies", dependencies.size()) + "</div>"); } }
HtmlDependenciesReport extends HtmlAbstractReport { @Override void toHtml() throws IOException { writeBackLink(); writeln("<br/>"); if (dependencies.isEmpty()) { writeln("#Aucune_dependance#"); return; } writeTitle("beans.png", getString("Dependencies")); final HtmlTable table = new HtmlTable(); table.beginTable(getString("Dependencies")); write("<th>Artifact</th><th>#Nom#</th><th>Maven ID</th><th>#Licence#</th>"); for (final Map.Entry<String, MavenArtifact> entry : dependencies.entrySet()) { final String jarFilename = entry.getKey(); final MavenArtifact dependency = entry.getValue(); table.nextRow(); writeDependency(jarFilename, dependency); } table.endTable(); writeln("<div align='right'>" + getFormattedString("nb_dependencies", dependencies.size()) + "</div>"); } HtmlDependenciesReport(Map<String, MavenArtifact> dependencies, Writer writer); }
HtmlDependenciesReport extends HtmlAbstractReport { @Override void toHtml() throws IOException { writeBackLink(); writeln("<br/>"); if (dependencies.isEmpty()) { writeln("#Aucune_dependance#"); return; } writeTitle("beans.png", getString("Dependencies")); final HtmlTable table = new HtmlTable(); table.beginTable(getString("Dependencies")); write("<th>Artifact</th><th>#Nom#</th><th>Maven ID</th><th>#Licence#</th>"); for (final Map.Entry<String, MavenArtifact> entry : dependencies.entrySet()) { final String jarFilename = entry.getKey(); final MavenArtifact dependency = entry.getValue(); table.nextRow(); writeDependency(jarFilename, dependency); } table.endTable(); writeln("<div align='right'>" + getFormattedString("nb_dependencies", dependencies.size()) + "</div>"); } HtmlDependenciesReport(Map<String, MavenArtifact> dependencies, Writer writer);  }
HtmlDependenciesReport extends HtmlAbstractReport { @Override void toHtml() throws IOException { writeBackLink(); writeln("<br/>"); if (dependencies.isEmpty()) { writeln("#Aucune_dependance#"); return; } writeTitle("beans.png", getString("Dependencies")); final HtmlTable table = new HtmlTable(); table.beginTable(getString("Dependencies")); write("<th>Artifact</th><th>#Nom#</th><th>Maven ID</th><th>#Licence#</th>"); for (final Map.Entry<String, MavenArtifact> entry : dependencies.entrySet()) { final String jarFilename = entry.getKey(); final MavenArtifact dependency = entry.getValue(); table.nextRow(); writeDependency(jarFilename, dependency); } table.endTable(); writeln("<div align='right'>" + getFormattedString("nb_dependencies", dependencies.size()) + "</div>"); } HtmlDependenciesReport(Map<String, MavenArtifact> dependencies, Writer writer);   }