예제 #1
0
        public void LogConsoleWritesToConsole()
        {
            const string cInputString = "test";
            LogConsole logConsole = new LogConsole();

            logConsole.Output("test");

            Assert.AreEqual(cInputString, GetOutputString());
        }
예제 #2
0
        public void LogConsoleWritesLineToConsole()
        {
            const string cInputString = "test";
            LogConsole logConsole = new LogConsole();

            logConsole.OutputLine("test");

            Assert.AreEqual(cInputString + Environment.NewLine, GetOutputString());
        }
예제 #3
0
        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();
            }
        }
예제 #4
0
        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();
            }
        }