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); }
/// <summary> /// Handles the SpecificationProcessed event that is triggered after the specification is processed /// </summary> /// <param name="sender">The sender.</param> /// <param name="eventArgs">The <see cref="SpecificationEventArgs"/> instance containing the event data.</param> public void SpecificationProcessedEventHandler(object sender, SpecificationEventArgs eventArgs) { TestLog.AttachXHtml(eventArgs.Resource.Name, eventArgs.Element.ToXml()); }