Based on #745, analyzer that detects calls to System.Console, System.Diagnostics.Debug, System.Diagnostics.Trace, and maybe others (System.Console.Error?). The fix provider would suggest using ITestOutputHelper (as per http://xunit.github.io/docs/capturing-output.html), including injecting it into the test class via constructor.
Things to consider:
Write/WriteLine methods, what would be the appropriate refactoring for each?~@marcind I'm about to implement this. You can assign me if possible.~
~Some opinions/thoughts:~
Trace, Debug, Console) be redirected to ITestOutputHelper ? I think yes.~ToString() for all non-string literal types; or add additional methods on ITestOutputHelper. I would prefer ToString() calls.~Write, Write[Line]If; or add if statements when transforming; or don't provide a fix. I would prefer to not provide a fix; conditional test code is bad.~Update: not of relevance anymore
@marcind ping 馃槃
@marcind ping
given the plan for v3 is to add Console / Trace / Debugger capture support perhaps this one should be closed?