Esempio n. 1
0
        private void AcceptResults(PageResult results)
        {
            TestCounts counts = results.TestCounts;

            pageCounts.TallyPageCounts(counts);
            totalCounts.TallyCounts(counts);
            clientSocket.SendCounts(counts);
            if (verbose)
            {
                for (int i = 0; i < counts.GetCount(TestStatus.Right); i++)
                {
                    output.Write(".");
                }
                if (counts.GetCount(TestStatus.Wrong) > 0)
                {
                    output.WriteLine();
                    output.WriteLine(PageDescription(results) + " has failures");
                }
                if (counts.GetCount(TestStatus.Exception) > 0)
                {
                    output.WriteLine();
                    output.WriteLine(PageDescription(results) + " has errors");
                }
            }
            resultWriter.WritePageResult(results);
        }
Esempio n. 2
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. 3
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) + "--><!-- saved from url=(0014)about:internet -->");
 }
 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();
 }
 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);
 }
        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());
        }
Esempio n. 7
0
		public void TestRight()
		{
			Assert.AreEqual(1, resultCounts.GetCount(TestStatus.Right));
            Assert.AreEqual(TestStatus.Right, finishedTable.At(0,1,0).GetAttribute(CellAttribute.Status));
		}