public void LogConsoleWritesToConsole() { const string cInputString = "test"; LogConsole logConsole = new LogConsole(); logConsole.Output("test"); Assert.AreEqual(cInputString, GetOutputString()); }
public void LogConsoleWritesLineToConsole() { const string cInputString = "test"; LogConsole logConsole = new LogConsole(); logConsole.OutputLine("test"); Assert.AreEqual(cInputString + Environment.NewLine, GetOutputString()); }
static void Main(string[] args) { Console.SetWindowSize(Console.WindowWidth, 60); Console.SetIn(new StreamReader(Console.OpenStandardInput(8192))); Log log = new Log(); TodoList todoList = new TodoList(); LogConsole console = new LogConsole(); State nextState = new DisplayLogHeaderState(console, log, todoList); while(null != nextState) { nextState.Execute(); nextState = nextState.GetNextState(); } }
static void Main(string[] args) { Console.SetWindowSize(Console.WindowWidth, 60); Console.SetIn(new StreamReader(Console.OpenStandardInput(8192))); Log log = new Log(); TodoList todoList = new TodoList(); LogConsole console = new LogConsole(); State nextState = new DisplayLogHeaderState(console, log, todoList); while (null != nextState) { nextState.Execute(); nextState = nextState.GetNextState(); } }