protected override void WriteToOutput(LogLevel logLevel, string text) { ITestLog ltmLog = GetLtmLog(); switch (logLevel) { case LogLevel.Warning: // UGH!!!!! ltmLog.Error(TestResult.Warning, TestLogFlags.Text, null, null, null, text, null, null, 0); break; case LogLevel.Error: // UGH!!!!! ltmLog.Error(TestResult.Exception, TestLogFlags.Text, null, null, null, text, null, null, 0); break; case LogLevel.Trace: case LogLevel.Verbose: ltmLog.WriteLine(TestLogFlags.Ignore, text); break; default: case LogLevel.Info: ltmLog.WriteLine(TestLogFlags.Text, text); break; } }
internal void HandleException(Exception ex, TestResult result) { ITestLog ltmLog = GetLtmLog(); while (ex != null) { DataComparisonException mex = ex as DataComparisonException; object expected = null; object actual = null; if (mex != null) { actual = mex.ActualValue; expected = mex.ExpectedValue; } ltmLog.Error(result, TestLogFlags.Text, ToStringConverter.ConvertObjectToString(actual), ToStringConverter.ConvertObjectToString(expected), ex.Source, ex.Message, ex.StackTrace, null, 0); ex = ex.InnerException; } }