【发布时间】:2022-12-10 17:31:55
【问题描述】:
我希望能够在单元测试的输出中添加指向相关数据的超链接。
我有以下测试:
using NUnit.Framework;
namespace BioFire.PanelSoftware.Service.Tests
{
[TestFixture]
public class SimpleTest
{
[Test]
public void Test1()
{
Console.WriteLine("www.google.com"); //not hyperlink
Console.WriteLine(@"C:\Program Files"); //not hyperlink
throw new Exception("My output window will somehow give me a hyperlink to here.");
}
}
}
根据this question,在 C# 中是不可能的。但它显然以某种方式为 nUnit 工作:
【问题讨论】: