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)); }
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(); }
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(); }
public void TallyCounts(TestCounts other) { foreach (var cellStatus in other.counts.Keys) { counts[cellStatus] = GetCount(cellStatus) + other.GetCount(cellStatus); } }
public TestCounts Subtract(TestCounts other) { var result = new TestCounts(this); foreach (var cellStatus in other.counts.Keys) { result.counts[cellStatus] = result.GetCount(cellStatus) - other.GetCount(cellStatus); } return(result); }
public void TallyCounts(TestCounts other) { foreach (string cellStatus in other.counts.Keys) counts[cellStatus] = GetCount(cellStatus) + other.GetCount(cellStatus); }
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; }
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)); }
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; }