I have here a bunch of unit tests. One of them expects the code to do nothing because the arguments parsing should not work.
Unfortunately, the arguments parsing library I'm using forces Console.Write()
in this case, and now my unit tests output is full of the library's messages, which makes it hard to read.
Is there a way to redirect the standard console output to nothing (or a temp file or whatever) before calling this method, and then redirecting it back to the standard output once it's finished ?
Thanks!
Update
Actually it's the error output that needs to be redirected...