Carriage return in ITestActionResult.ErrorMessage
I am using TFS API 2010 to insert multiple error messages into ITestActionResult
. If I do it with TestRunner (Add Comment) and read the (ErrorMessage) field from the API, the line looks like this:"Line1\r\nLine1\r\n"...
If I set ErrorMessage with TFS API like this: the
actionResult.ErrorMessage = "Line1\r\nLine2\r\n"
sequence "\r\n"
will be ignored! I am also trying to use a variable Environment.NewLine
, here the sequence "\r\n"
will be treated as a string and not as an escape sequence.
How do I add newlines in a ITestActionResult.ErrorMessage
similar way if I use TestRunner and return the return correctly?
source to share