I have an app which can be used like:
type file.txt|app.exe -i
I.e. my app will read the data from file.txt.
And now I want to write some tests to make sure app works well with some special data in file.txt.
How to organize this?
My app reads input like
input = Console.In.ReadToEnd();
On the simple tests without reading data I was simply using App class like:
using(App app = new App())
{
result = app.Run(args)
}
if (result != 0)
Assert.Fail("Failed");