參考連接:html
http://www.javashuo.com/article/p-mzykoyth-bn.htmlweb
http://landcareweb.com/questions/15813/xunit-netbu-bu-huo-kong-zhi-tai-shu-chu調試
以下,這種我也認爲不是一種很好的方式,輸出調試信息居然須要注入。。。。。htm
public class MyTestSpec { private readonly ITestOutputHelper _testOutputHelper; public MyTestSpec(ITestOutputHelper testOutputHelper) { _testOutputHelper = testOutputHelper; } [Fact] public void MyFact() { _testOutputHelper.WriteLine("Hello world"); } }