Main Page | Report this Page
.NET DotNet Forum Index  »  .NET Framework Forum  »  Writing to Debug Outfrom from Tests?...
Page 1 of 1    

Writing to Debug Outfrom from Tests?...

Author Message
SnapDive...
Posted: Mon Oct 19, 2009 1:08 pm
Guest
I have a Visual Studio 2008 unit test running. I am testing something
that writes to an instance TextWriter.

Normally, this thing writes to Console.Out, but now I would like ir to
write to the test results output stream. How can I redirect/wrap my
stuff to write to the test output?

Thanks.
 
cubaman...
Posted: Mon Oct 19, 2009 10:47 pm
Guest
On Oct 19, 9:08 pm, SnapDive <SnapD... at (no spam) community.nospam> wrote:
Quote:
I have a Visual Studio 2008 unit test running. I am testing something
that writes to an instance TextWriter.

Normally, this thing writes to Console.Out, but now I would like ir to
write to the test results output stream. How can I redirect/wrap my
stuff to write to the test output?

Thanks.

Take a look at Console.SetOut method
http://msdn.microsoft.com/en-us/library/system.console.setout.aspx
 
 
Page 1 of 1    
All times are GMT - 5 Hours
The time now is Sun Dec 06, 2009 10:42 pm