public void TestBasico() { var out1 = new Report(new HTMLFormatter()).OutputReport(); var out2 = new Report(new PlainTextFormatter()).OutputReport(); Assert.AreNotEqual(out1, out2); }
public void TestCruzadoPlainText() { var out1 = new PlainTextReport().OutputReport(); var out2 = new Strategy.Report(new Strategy.PlainTextFormatter()).OutputReport(); Assert.AreEqual(out1, out2); }
public void TestCruzadoHTML() { var out1 = new HTMLReport().OutputReport(); var out2 = new Strategy.Report(new Strategy.HTMLFormatter()).OutputReport(); Assert.AreEqual(out1, out2); }
public string OutputReport(Report context) { string aux = string.Empty; aux += "*****" + context.Title + "*****" + Environment.NewLine + Environment.NewLine; foreach (var item in context.Body) { aux += item + Environment.NewLine; } return aux; }
public string OutputReport(Report context) { string aux = string.Empty; aux += "<html>"; aux += "<head>"; aux += "<title>"; aux += context.Title; aux += "</title>"; aux += "</head>"; aux += "<body>"; foreach (var item in context.Body) { aux += "<p>" + item + "</p>"; } aux += "</body>"; aux += "</html>"; return aux; }