public ConsoleMock() { _consoleManager = new ConsoleIOManager(); _defaultIn = Console.In; _defaultOut = Console.Out; Console.SetIn(new InputManager(_consoleManager)); Console.SetOut(new OutputManager(_consoleManager, Console.OutputEncoding)); PatchConsole(); }
public InputManager(ConsoleIOManager consoleManager) { _consoleManager = consoleManager; }
public OutputManager(ConsoleIOManager consoleManager, Encoding encoding) { _consoleManager = consoleManager; _encoding = encoding; }