private string GetOutputFromTheApp(string[] args) { var fakeConsoleOutput = new StringWriter(); Console.SetOut(fakeConsoleOutput); RateCalculator.Main(args); return(fakeConsoleOutput.ToString()); }