Ejemplo n.º 1
0
        public void TestInitialize()
        {
            codurer = new Codurer(UserServiceFactory.GetInMemoryUserService());
            now = DateTime.Now;
            commandExecutor =
                new CommandExecutor(codurer, CommandDescriptorFactory.GetCommandDescriptors());

            PostAliceMessages();
            PostBobMessages();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            var userService = UserServiceFactory.GetInMemoryUserService();
            var codurer = new Codurer(userService);
            var commandExecutor =
                new CommandExecutor(codurer, CommandDescriptorFactory.GetCommandDescriptors());
            var quitString = "!q";

            Console.Write(">");
            string commandLine = Console.ReadLine();

            while (commandLine != quitString)
            {
                var commandResult = commandExecutor.ExecuteCommand(commandLine);
                foreach (string wallMessage in commandResult.Messages)
                {
                    Console.WriteLine(wallMessage);
                }

                Console.Write(">");
                commandLine = Console.ReadLine();
            }
        }