本文整理汇总了C#中ResultState.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# ResultState.ToString方法的具体用法?C# ResultState.ToString怎么用?C# ResultState.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ResultState
的用法示例。
在下文中一共展示了ResultState.ToString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ToString_Constructor_ReturnsExpectedString
public void ToString_Constructor_ReturnsExpectedString(TestStatus status, string label, string expected)
{
ResultState resultState = new ResultState(status, label);
Assert.AreEqual(expected, resultState.ToString());
}
示例2: GetTranslatedResultState
// Returns ResultState translated to a v3 string representation
private static string GetTranslatedResultState(ResultState resultState)
{
switch (resultState)
{
case ResultState.Inconclusive:
return "Inconclusive";
case ResultState.NotRunnable:
return "Failed:Invalid";
case ResultState.Skipped:
return "Skipped";
case ResultState.Ignored:
return "Skipped:Ignored";
case ResultState.Success:
return "Passed";
case ResultState.Failure:
return "Failed";
case ResultState.Error:
return "Failed:Error";
case ResultState.Cancelled:
return "Failed:Cancelled";
}
return resultState.ToString();
}
示例3: WhenResultIsSet_IndexReflectsResultState
public void WhenResultIsSet_IndexReflectsResultState(ResultState resultState, int expectedIndex)
{
TestSuiteTreeNode node = new TestSuiteTreeNode(new TestInfo(testCase));
TestResult result = new TestResult(testCase);
result.SetResult(resultState, null, null);
node.Result = result;
Assert.AreEqual(expectedIndex, node.ImageIndex);
Assert.AreEqual(expectedIndex, node.SelectedImageIndex);
Assert.AreEqual(resultState.ToString(), node.StatusText);
}