public FailedResult(IMethodInfo method, Exception exception, string displayName) : base(method, displayName) { ExceptionType = exception.GetType().FullName; Message = ExceptionUtility.GetMessage(exception); StackTrace = ExceptionUtility.GetStackTrace(exception); }
/// <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); } }
/// <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)) { }
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)) { }