Example #1
0
        public void GetList_OutputShouldContainStreamingContent()
        {
            // Arrange
            // Get the commands we want to run
            // Initialize our Console and UI
            var commandList = new List <string>()
            {
                "1", "6"
            };
            // picked commands we want to use
            var console = new MockConsole(commandList);
            // built out console
            var program = new ProgramUI(console);

            // built ProgramUI

            // Act
            // Run the application
            program.Start();
            Console.WriteLine(console.Output);

            // Assert
            // Check for specified content in Output
            Assert.IsTrue(console.Output.Contains("Toy Story"));
        }
        public void AddToList_ShouldFindByTitle()
        {
            //-- Arrange
            var description = "Some Custom Description";
            var commandList = new string[] { "3", "Title", description, "8", "5", "2020", "3", "2", "Title", "6" };
            var console     = new MockConsole(commandList);
            var ui          = new ProgramUI(console);

            //-- Act
            ui.Start();
            Console.WriteLine(console.Output);

            //-- Assert
            Assert.IsTrue(console.Output.Contains(description));
        }
Example #3
0
        public void AddToList_ShouldFindByTitle()
        {
            // Arrange
            var description = "Some Custom Description"; // created description variable to be able to use multiple times without typing a description every time
            //                              List of commands to do
            var commandList = new string[] { "3", "Title", description, "8", "5", "2020", "3", "2", "Title", "6" };
            var console     = new MockConsole(commandList);
            var ui          = new ProgramUI(console);

            // Act
            ui.Start();
            Console.WriteLine(console.Output);

            // Assert
            Assert.IsTrue(console.Output.Contains(description));
        }
        public void GetList_OutputShouldContainStreamingContent()
        {
            //-- Arrange
            // Get the commands we want to run
            // Initialize our Console and UI
            var commandList = new List <string>()
            {
                "1", "6"
            };
            var console = new MockConsole(commandList);
            var program = new ProgramUI(console);

            //-- Act
            // Run the application
            program.Start();
            Console.WriteLine(console.Output);

            //-- Assert
            // Check for specified content in Output
            Assert.IsTrue(console.Output.Contains("Hello Kitty Island Adventure"));
        }