本文整理汇总了C#中fitSharp.Fit.Model.TestCounts.GetCount方法的典型用法代码示例。如果您正苦于以下问题:C# TestCounts.GetCount方法的具体用法?C# TestCounts.GetCount怎么用?C# TestCounts.GetCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fitSharp.Fit.Model.TestCounts
的用法示例。
在下文中一共展示了TestCounts.GetCount方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckCounts
public static void CheckCounts(TestCounts counts, int right, int wrong, int ignore, int exception)
{
Assert.AreEqual(right, counts.GetCount(TestStatus.Right));
Assert.AreEqual(wrong, counts.GetCount(TestStatus.Wrong));
Assert.AreEqual(ignore, counts.GetCount(TestStatus.Ignore));
Assert.AreEqual(exception, counts.GetCount(TestStatus.Exception));
}
示例2: WriteCounts
void WriteCounts(TestCounts summary, string tag) {
writer.WriteStartElement(tag);
writer.WriteElementString("right", summary.GetCount(TestStatus.Right).ToString());
writer.WriteElementString("wrong", summary.GetCount(TestStatus.Wrong).ToString());
writer.WriteElementString("ignores", summary.GetCount(TestStatus.Ignore).ToString());
writer.WriteElementString("exceptions", summary.GetCount(TestStatus.Exception).ToString());
writer.WriteEndElement();
}
示例3: FormatCounts
public static String FormatCounts(TestCounts status)
{
var builder = new StringBuilder();
builder.Append(FormatInteger(0));
builder.Append(FormatInteger(status.GetCount(TestStatus.Right)));
builder.Append(FormatInteger(status.GetCount(TestStatus.Wrong)));
builder.Append(FormatInteger(status.GetCount(TestStatus.Ignore)));
builder.Append(FormatInteger(status.GetCount(TestStatus.Exception)));
return builder.ToString();
}
示例4: TallyCounts
public void TallyCounts(TestCounts other) {
foreach (string cellStatus in other.counts.Keys) counts[cellStatus] = GetCount(cellStatus) + other.GetCount(cellStatus);
}
示例5: Subtract
public TestCounts Subtract(TestCounts other) {
var result = new TestCounts(this);
foreach (string cellStatus in other.counts.Keys) result.counts[cellStatus] = result.GetCount(cellStatus) - other.GetCount(cellStatus);
return result;
}
示例6: CheckCounts
public static void CheckCounts(TestCounts counts, int right, int wrong, int ignore, int exception)
{
Assert.AreEqual(right, counts.GetCount(CellAttributes.RightStatus));
Assert.AreEqual(wrong, counts.GetCount(CellAttributes.WrongStatus));
Assert.AreEqual(ignore, counts.GetCount(CellAttributes.IgnoreStatus));
Assert.AreEqual(exception, counts.GetCount(CellAttributes.ExceptionStatus));
}
示例7: ResultComment
static string ResultComment(TestCounts counts)
{
return "<!--"
+ Clock.Instance.Now.ToString("yyyy-MM-dd HH:mm:ss,")
+ counts.GetCount(TestStatus.Right) + ","
+ counts.GetCount(TestStatus.Wrong) + ","
+ counts.GetCount(TestStatus.Ignore) + ","
+ counts.GetCount(TestStatus.Exception) + "-->"
+ Environment.NewLine;
}