I have a function whose specification calls for it to write to stdout. When I test, stdout is MIA and I can't find it. I need to catch it so I can assert expected responses. The method will be called by a command pipeline.
In addition, I will be writing some pipeline functions: ==stdin==> method ==stdout==>. That means my unit tests need to push test data into stdin.
I am planning the test scenario before writing the methods and not finding a lot of recent information. I am hoping that MSTest might have some helper methods for this. If not, I could use some guidance regarding how I might go about writing my own.