plioi/fixie — pull request #70 by plioi (2014-12-15 23:14:14+00:00)
Title: Visual Studio runner redirects all console output to the VS Output window, and reports per-test console output as part of each test result.

The Visual Studio test runner API is, er, *impolite* with regards to console output. Console writes performed by your tests or by your system under test are hidden from the developer. This pull request works around this limitation by using the available VS test runner API's logging interface. A custom TextWriter wraps that interface and is submitted to the test-running AppDomain, so any subsequent Console writes get echoed to the VS Output window.

The VS test runner API's logging interface has a few restrictions:

1. Each call to SendMessage will automatically get an end-of-line, so the custom TextWriter is line-buffered and the would-be redundant Environment.NewLine is removed.
2. SendMessage hates developers, so it throws when the given string is all whitespace. Therefore, all such echoed console output is prefixed with [Console]. The added benefit is this helps a developer distinguish their own console output from other VS test runner logging.