示例#1
0
        public virtual void AddTestResultDetail(
            TestResultDetailTypes detailType,
            string detail)
        {
            if (TmxHelper.TestCaseStarted == DateTime.MinValue)
            {
                TmxHelper.TestCaseStarted = DateTime.Now;
            }
            DetailType = detailType;

            switch (detailType)
            {
            case TestResultDetailTypes.Screenshot:
                ScreenshotDetail = detail;
                break;

//                case TestResultDetailTypes.ErrorRecord:
//
//                    break;
            case TestResultDetailTypes.Comment:
                TextDetail = detail;
                break;

            case TestResultDetailTypes.Log:
                LogDetail = detail;
                break;

            case TestResultDetailTypes.ExternalData:
                ExternalData.Add(detail);
                break;

            default:
                throw new Exception("Invalid value for TestResultDetailTypes");
            }
        }