public void Persist(object Object)
 {
     if (Object is ExceptionInfo)
     {
         XmlLog.CurrentTest.AddException(new XmlExceptionInfo((ExceptionInfo)Object));
     }
     else
     {
         ExceptionsHelper.ThrowObjectLoggerDoesNotSupportThisObjectType(Object, typeof(ExceptionInfo));
     }
 }
Exemple #2
0
 /// <summary></summary>
 /// <param name="testResultsInfo">TestResultInfo</param>
 public void Persist(object testResultsInfo)
 {
     if (testResultsInfo is TestResultInfo)
     {
         XmlLog.CurrentTest.Result = new XmlTestResult((TestResultInfo)testResultsInfo);
     }
     else
     {
         ExceptionsHelper.ThrowObjectLoggerDoesNotSupportThisObjectType(testResultsInfo, typeof(TestResultInfo));
     }
 }
        public void Persist(object Object)
        {
            if (Object is StartTestInfo)
            {
                XmlLog.StartNewTest();
                XmlLog.CurrentTest.TestInfo = new XmlTestInfo((StartTestInfo)Object);

                string possibleIssuesMessage = ((StartTestInfo)Object).PossibleIssuesMessage;
                if (!string.IsNullOrEmpty(possibleIssuesMessage))
                {
                    new CommentInfoObject().Persist(new CommentInfo(possibleIssuesMessage));
                }
            }
            else
            {
                ExceptionsHelper.ThrowObjectLoggerDoesNotSupportThisObjectType(Object, typeof(StartTestInfo));
            }
        }