コード例 #1
0
        public void AttachedResources()
        {
            TestLog.WriteLine("Attached image.");
            TestLog.AttachImage("Image", Resources.MbUnitLogo);

            TestLog.WriteLine("Attached plain text.");
            TestLog.AttachPlainText("Plain Text", "This is some plain text.\nLalalala...");

            TestLog.WriteLine("Attached XML.");
            TestLog.AttachXml("XML", "<life><universe><everything>42</everything></universe></life>");

            TestLog.WriteLine("Attached XHTML.");
            TestLog.AttachXHtml("XHtml", "<p>Some <b>XHTML</b> markup.<br/>With a line break.</p>");

            TestLog.WriteLine("Attached HTML.");
            TestLog.AttachHtml("Html", "<p>Some <b>HTML</b> markup.<br>With a line break.</p>");

            TestLog.WriteLine("Attached binary data.");
            TestLog.Attach(new BinaryAttachment("Binary", "application/octet-stream", new byte[] { 67, 65, 66, 66, 65, 71, 69 }));

            TestLog.Write("Attached video.");
            TestLog.AttachVideo("Video", video);
        }