GetCount() public method

public GetCount ( string cellStatus ) : int
cellStatus string
return int
Esempio n. 1
0
 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));
 }
Esempio n. 2
0
 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();
 }
Esempio n. 3
0
		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);
        }
Esempio n. 6
0
 public void TallyCounts(TestCounts other) {
     foreach (string cellStatus in other.counts.Keys) counts[cellStatus] = GetCount(cellStatus) + other.GetCount(cellStatus);
 }
Esempio n. 7
0
 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;
 }
Esempio n. 8
0
 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));
 }
Esempio n. 9
0
 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;
 }