public string getOutputFromInput(string input) { var originalConsoleOut = Console.Out; var originalConsoleIn = Console.In; StringWriter mockedOut = new StringWriter(); StringReader mockedIn = new StringReader(input); Console.SetOut(mockedOut); Console.SetIn(mockedIn); AlphaApp alphaApp = new AlphaApp(); alphaApp.run(); return(mockedOut.ToString()); }
public static void Main(string[] args) { App app = new AlphaApp(); app.run(); }