Example #1
0
        public XDocument CreateReport(TestItem testItem, TestEnvironmentInfo testEnvironmentInfo)
        {
            XDocument report = new XDocument();
            report.AddFirst(new XDocumentType("html", null, null, null));

            var html = new XElement("html");
            html.Add(GetHead());
            html.Add(GetBody(testItem, testEnvironmentInfo));

            report.Add(html);

            return report;
        }
Example #2
0
        public XElement GetBody(TestItem testItem, TestEnvironmentInfo testEnvironmentInfo)
        {
            var body = new XElement("body");

            var js = new XElement("script");
            js.Add(new XAttribute("src", "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"));
            js.Add(new XAttribute("integrity", "sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS"));
            js.Add(new XAttribute("crossorigin", "anonymous"));

            var container = new XElement("div", new XAttribute("class", "container"));
            container.Add(GetEnvironment(testEnvironmentInfo));

            body.Add(container, js);

            return body;
        }