Exemplo n.º 1
0
        public void LogConsoleWritesToConsole()
        {
            const string cInputString = "test";
            LogConsole logConsole = new LogConsole();

            logConsole.Output("test");

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

            logConsole.OutputLine("test");

            Assert.AreEqual(cInputString + Environment.NewLine, GetOutputString());
        }
Exemplo n.º 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();
            }
        }
Exemplo n.º 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();
            }
        }