Esempio n. 1
0
        public override XElement GenerateHtml()
        {
            XElement html = new XElement("div");

            XElement trMessage = new XElement("tr");
            XElement tdMessage = new XElement("td");


            if (!string.IsNullOrEmpty(Reason))
            {
                XElement reasonMessage = new XElement("pre", Reason);
                tdMessage.Add(reasonMessage);
                trMessage.Add(tdMessage);
            }

            html.Add(trMessage);

            trMessage.SetAttributeValue("style", "font-size:11px; text-align:left;");
            trMessage.SetAttributeValue("bgcolor", "lightgrey");
            tdMessage.SetAttributeValue("colspan", "3");

            foreach (var testSuite in TestSuites)
            {
                XElement _html = testSuite.GenerateHtml();
                html.Add(_html);
            }
            foreach (var testCase in TestCases)
            {
                testCase.HtmlGenerator = new HtmlGenerator2();
                XElement _html = testCase.GenerateHtml();
                _html = new HtmlGenerator1().Generate(testCase);
                html.Add(_html);
            }
            return(html);
        }
Esempio n. 2
0
        public override XElement GenerateHtml()
        {
            XElement html = new XElement("div");

            XElement trMessage = new XElement("tr");
            XElement tdMessage = new XElement("td");


            if (!string.IsNullOrEmpty(Reason))
            {
                XElement reasonMessage = new XElement("pre", Reason);
                tdMessage.Add(reasonMessage);
                trMessage.Add(tdMessage);
            }

            html.Add(trMessage);

            trMessage.SetAttributeValue("style", "font-size:11px; text-align:left;");
            trMessage.SetAttributeValue("bgcolor", "lightgrey");
            tdMessage.SetAttributeValue("colspan", "3");

            foreach (var testSuite in TestSuites)
            {
                XElement _html = testSuite.GenerateHtml();
                html.Add(_html);
            }
            foreach (var testCase in TestCases)
            {
                testCase.HtmlGenerator = new HtmlGenerator2();
                XElement _html = testCase.GenerateHtml();
                _html = new HtmlGenerator1().Generate(testCase);
                html.Add(_html);
            }
            return html;
        }