本文整理汇总了C#中ITestResult.IsInconclusive方法的典型用法代码示例。如果您正苦于以下问题:C# ITestResult.IsInconclusive方法的具体用法?C# ITestResult.IsInconclusive怎么用?C# ITestResult.IsInconclusive使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITestResult
的用法示例。
在下文中一共展示了ITestResult.IsInconclusive方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestFinished
public void TestFinished(ITestResult result)
{
AndroidRunner.Results[result.Test.FullName ?? result.Test.Name] = result;
if (result.Test is TestSuite)
{
if (!result.IsFailure() && !result.IsSuccess() && !result.IsInconclusive() && !result.IsIgnored())
Writer.WriteLine("\t[INFO] {0}", result.Message);
string name = result.Test.Name;
if (!String.IsNullOrEmpty(name))
Writer.WriteLine("{0} : {1} ms", name, result.Time * 1000);
}
else
{
if (result.IsSuccess())
{
Writer.Write("\t[PASS] ");
}
else if (result.IsIgnored())
{
Writer.Write("\t[IGNORED] ");
}
else if (result.IsFailure())
{
Writer.Write("\t[FAIL] ");
}
else if (result.IsInconclusive())
{
Writer.Write("\t[INCONCLUSIVE] ");
}
else
{
Writer.Write("\t[INFO] ");
}
Writer.Write(result.Test.Name);
string message = result.Message;
if (!String.IsNullOrEmpty(message))
{
Writer.Write(" : {0}", message.Replace("\r\n", "\\r\\n"));
}
Writer.WriteLine();
string stacktrace = result.StackTrace;
if (!String.IsNullOrEmpty(result.StackTrace))
{
string[] lines = stacktrace.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
foreach (string line in lines)
Writer.WriteLine("\t\t{0}", line);
}
}
}