【发布时间】:2020-07-28 00:27:03
【问题描述】:
我有以下测试:
[Test]
public void RetrieveWrongURL()
{
Debug.WriteLine("In RetrieveWrongURL");
Console.WriteLine("In RetrieveWrongURL");
Assert.Throws<IncorrectUrlSuppliedException>(() => mRetriever.doSomething("https://someWrong.url"));
}
当我运行测试时,在Output 窗口中我得到:
[05/01/2018 10:23:40 Informational] ------ Run test started ------
[05/01/2018 10:23:41 Informational] NUnit Adapter 3.9.0.0: Test execution started
[05/01/2018 10:23:41 Informational] Running selected tests in Z:\path\to\my\dll\MyDll.dll
[05/01/2018 10:23:41 Informational] NUnit3TestExecutor converted 3 of 3 NUnit test cases
[05/01/2018 10:23:42 Informational] NUnit Adapter 3.9.0.0: Test execution complete
[05/01/2018 10:23:42 Informational] ========== Run test finished: 1 run (0:00:02.0995689) ==========
如何在输出窗口中写入任何内容?
【问题讨论】:
标签: c# visual-studio