Ejemplo n.º 1
0
 public FailedResult(IMethodInfo method, Exception exception, string displayName)
     : base(method, displayName)
 {
     ExceptionType = exception.GetType().FullName;
     Message       = ExceptionUtility.GetMessage(exception);
     StackTrace    = ExceptionUtility.GetStackTrace(exception);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Sets the exception thrown by the test fixture.
 /// </summary>
 /// <param name="ex">The thrown exception</param>
 public void SetException(Exception ex)
 {
     if (ex == null)
     {
         exceptionType = null;
         message       = null;
         stackTrace    = null;
     }
     else
     {
         exceptionType = ex.GetType().FullName;
         message       = ExceptionUtility.GetMessage(ex);
         stackTrace    = ExceptionUtility.GetStackTrace(ex);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ErrorMessage"/> class.
 /// </summary>
 /// <param name="ex">The exception that represents the error message.</param>
 public ErrorMessage(Exception ex)
     : this(ex.GetType().FullName, ExceptionUtility.GetMessage(ex), ExceptionUtility.GetStackTrace(ex))
 {
 }
Ejemplo n.º 4
0
 public TestFailed(ITestCase testCase, string testDisplayName, decimal executionTime, string output, Exception ex)
     : this(testCase, testDisplayName, executionTime, output, ex.GetType().FullName, ExceptionUtility.GetMessage(ex), ExceptionUtility.GetStackTrace(ex))
 {
 }