Пример #1
0
        public void EmbeddedResources()
        {
            TestLog.Write("Embedded image:");
            TestLog.EmbedImage("Image", Resources.MbUnitLogo);

            TestLog.Write("Embedded plain text:");
            TestLog.EmbedPlainText("Plain Text", "This is some plain text.\nLalalala...\n\tIndented with TAB.\nThis should all appear to be preformatted.");

            TestLog.Write("Embedded XML:");
            TestLog.EmbedXml("XML", "<life><universe><everything>42</everything></universe></life>");

            TestLog.Write("Embedded XHTML:");
            TestLog.EmbedXHtml("XHtml", "<p>Some <b>XHTML</b> markup.<br/>With a line break.</p>");

            TestLog.Write("Embedded HTML:");
            TestLog.EmbedHtml("Html", "<p>Some <b>HTML</b> markup.<br>With a line break.</p>");

            TestLog.Write("Embedded binary data:");
            TestLog.Embed(new BinaryAttachment("Binary", "application/octet-stream", new byte[] { 67, 65, 66, 66, 65, 71, 69 }));

            TestLog.Write("Embedded video:");
            TestLog.EmbedVideo("Video", video);

            TestLog.Write("The same embedded image as above:");
            TestLog.EmbedExisting("Image");
        }