Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

nunit capture debug.print 1

Status
Not open for further replies.

ajikoe

Programmer
Apr 16, 2004
71
ID
hello,

I would like to test my unit using nunit.
But I found problem when my unit call Debug.WriteLine("something");

How can my nunit know if my program trigger Debug.WriteLine?

Sincerely Yours,
Pujo
 
I would replace the Debug.WriteLine with Console.WriteLine -- NUnit is able to capture those statements.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Hello Chip,

Thanks for your advice,
but I use Debug.WriteLine to report something if my program goes wrong but still produce result, so I can always make sure that the debug pane will always empty for sure there is no problem in my program.

Sincerely Yours,
Pujo Aji
 
The Debug object does not write to stdout, and thus NUnit (nor any other tool) is not able to display output from it.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top