示例#1
0
 public XmlTestResult(TestResultInfo testResultInfo)
 {
     switch (testResultInfo.Result)
     {
         case TestResultInfo.TestResults.Passed: this.Status = Results.Passed; break;
         case TestResultInfo.TestResults.Failed: this.Status = Results.Failed; break;
         case TestResultInfo.TestResults.UnexpectedError: this.Status = Results.UnexpectedError; break;
     }
 }
示例#2
0
 /// --------------------------------------------------------------------
 /// <summary></summary>
 /// --------------------------------------------------------------------
 virtual protected void SetTestResult(TestResultInfo testResultInfo)
 {
     _testResultInfo = testResultInfo;
 }
示例#3
0
        /// --------------------------------------------------------------------
        /// <summary></summary>
        /// --------------------------------------------------------------------
        virtual protected void LogStartTest(StartTestInfo startTestInfo)
        {
            _numberOfTests++;

            // Assume pass unless we call fail
            _testResultInfo = new TestResultInfo(TestResultInfo.TestResults.Passed);
            const string delim = "\r\n";
            string info = startTestInfo.ToString();
            int iLocE = info.IndexOf(delim);
            int iLocS = 0;

            LogComment("".PadLeft(80, '='));
            while (iLocE != -1)
            {
                LogComment(string.Format("Description : {0}", info.Substring(iLocS, iLocE - iLocS)));
                iLocS = iLocE + delim.Length;
                iLocE = info.IndexOf("\r\n", iLocS);
            }
            LogComment("".PadLeft(80, '='));

        }