Exemplo n.º 1
0
        public void TestBasico()
        {
            var out1 = new Report(new HTMLFormatter()).OutputReport();
            var out2 = new Report(new PlainTextFormatter()).OutputReport();

            Assert.AreNotEqual(out1, out2);
        }
Exemplo n.º 2
0
        public void TestCruzadoPlainText()
        {
            var out1 = new PlainTextReport().OutputReport();
            var out2 = new Strategy.Report(new Strategy.PlainTextFormatter()).OutputReport();

            Assert.AreEqual(out1, out2);
        }
Exemplo n.º 3
0
        public void TestCruzadoHTML()
        {
            var out1 = new HTMLReport().OutputReport();
            var out2 = new Strategy.Report(new Strategy.HTMLFormatter()).OutputReport();

            Assert.AreEqual(out1, out2);
        }
Exemplo n.º 4
0
        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;
        }
Exemplo n.º 5
0
        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;
        }