示例#1
0
        public void Evaluate_EmptyInput_ReturnEmptyString()
        {
            // Arrange

            // Act
            var retVal = _interpreter.Evaluate("");

            // Assert
            Assert.AreEqual("", retVal);
        }
示例#2
0
        public static void Main(string[] args)
        {
            var commandInterpreter = new CommandInterpreter();

            Console.WriteLine("Welcome to the photo album browser.\nIf this is your first time using the application, please type 'help' at the prompt below.\nWritten by Joseph Hicks(c)");

            while (true)
            {
                Console.Write("> ");
                var input = Console.ReadLine();

                if (input.ToLower().StartsWith("exit"))
                {
                    break;
                }

                var output = commandInterpreter.Evaluate(input);

                Console.WriteLine($"\n{output}\n");
            }
        }