private void PrintTable(SummaryTable table, ILogger logger) { if (table.FullContent.Length == 0) { logger.WriteLineError("<pre>There are no benchmarks found</pre>"); return; } logger.Write("<pre><code>"); table.PrintCommonColumns(logger); logger.WriteLine("</code></pre>"); logger.NewLine(); logger.WriteLine("<table>"); var prefixLogger = new LoggerWithPrefix(logger, "\t"); prefixLogger.Write("<tr>"); table.PrintLine(table.FullHeader, prefixLogger, "<th>", "</th>"); prefixLogger.WriteLine("</tr>"); foreach (var line in table.FullContent) { prefixLogger.Write("<tr>"); table.PrintLine(line, prefixLogger, "<td>", "</td>"); prefixLogger.WriteLine("</tr>"); } logger.WriteLine("</table>"); }
public void Write() { loggerWithPrefix.Write("1"); loggerWithPrefix.Write("2"); Assert.Equal("prefix12", logger.GetLog()); }