public static void AttachToCurrentTest(this Plotting.Point2Series points, string fileName) { System.Diagnostics.Debug.Assert(fileName.ToLowerInvariant().EndsWith(".html")); NUnit.Framework.AttachmentInfo .From(fileName) .WriteObject(f => points.DrawToFile(f.FullName)); }
public static void AttachToCurrentTest(this Plotting.Point2Series points, string fileName) { fileName = NUnit.Framework.TestContext.CurrentContext.GetAttachmentPath(fileName); points.DrawToFile(fileName); NUnit.Framework.TestContext.AddTestAttachment(fileName); }
public static void AttachToCurrentTest(this Plotting.Point2Series points, string fileName) { System.Diagnostics.Debug.Assert(fileName.ToLower().EndsWith(".html")); fileName = NUnit.Framework.TestContext.CurrentContext.GetAttachmentPath(fileName); points.DrawToFile(fileName); if (System.IO.File.Exists(fileName)) { NUnit.Framework.TestContext.AddTestAttachment(fileName); } }