public static void Error(TestResult result, object actual, object expected, string source, string message, string stack, string filename, int lineno) { //Log the error if (Internal != null) { Internal.Error(result, TestLogFlags.Text, //flags StringEx.Format(actual), //actual StringEx.Format(expected), //expected source, //source message, //message stack, //stack filename, //filename lineno //line ); } else { //We call IError::Compare, which logs the error AND increments the error count... Console.WriteLine("Message:\t" + message); Console.WriteLine("Source:\t\t" + source); Console.WriteLine("Expected:\t" + expected); Console.WriteLine("Received:\t" + actual); Console.WriteLine("Details:" + TestLog.NewLine + stack); Console.WriteLine("File:\t\t" + filename); Console.WriteLine("Line:\t\t" + lineno); } }
static public void Error(TestResult result, object actual, object expected, string source, string message, string stack, String filename, int lineno) { //Log the error if (Internal != null) { //ITestConsole.Log //TODO: We could pass in ints - if the objects are convertable to int, ie: they may //actually be comparing two values, not complex objects. Internal.Error(result, TestLogFlags.Text, //flags StringEx.Format(actual), //actual StringEx.Format(expected), //expected source, //source message, //message stack, //stack filename, //filename lineno //line ); } else { //We call IError::Compare, which logs the error AND increments the error count... Console.WriteLine("Message:\t" + message); Console.WriteLine("Source:\t\t" + source); Console.WriteLine("Expected:\t" + expected); Console.WriteLine("Received:\t" + actual); Console.WriteLine("Details:" + TestLog.NewLine + stack); Console.WriteLine("File:\t\t" + filename); Console.WriteLine("Line:\t\t" + lineno); } }