Improvement: Extend TestContext with Write method
See original GitHub issueI would like to suggest to add to TestContext
the Write(string message)
method. The suggested method behaves identically to the existing method WriteLine(string message)
, except that it does not terminate the message with the newline character. Compare for example the existence of both Write
and WriteLine
in System.Console
.
In a project I am currently working on, there is a lot of existing logging code. I wrote a logging adapter forwarding the logging output to TestContext.WriteLine
. The logging mechanism already takes care of formatting and inserts line terminators. This results in empty lines (double line termination) in the test log, making it harder to read and unnecessary long.
I would be glad to contribute the PR myself, but only if it fits in the product vision, of course.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top GitHub Comments
Ah okay, next time please mention the issue in the PR like this, so it gets vlosed when the PR is merged:
Fixes #645
@nohwnd this issue can be closed now