【发布时间】:2017-09-17 10:46:44
【问题描述】:
我为我的 android 应用程序创建了一个 NUnit 测试,我希望看到一些文本输出。
我错过了显而易见的事情吗?如何在结果中输出文本?
[Test]
public void ConsoleWriteline_WhenInvokedWithText_Does_NotOutputText()
{
System.Console.Write("foo"); //does not work
System.Console.WriteLine("bar");//does not work
Assert.Pass("Test");
}
【问题讨论】:
-
尝试 Trace.Write 或 Debug.Write
-
感谢您的回答,它们显示在输出窗口中,但未出现在单元测试中
标签: unit-testing xamarin nunit