Skip to content

Improvement: Extend TestContext with Write method #645

Closed

Description

I 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Help-WantedThe issue is up-for-grabs, and can be claimed by commenting

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions