public void Seed()
        {
            _repo  = new KomodoCafeRepo();
            burger = new KomodoCafeMenu(
                1, "BurgerMeal", "Big Burger Meal", "Flour, cow", 55.55m
                );
            KomodoCafeMenu Chicken = new KomodoCafeMenu(
                2,
                "Chicken Meal",
                "Spicky chicken sammich",
                "flour, chicken, spice",
                66.66m);

            _repo.AddContentToDirectory(burger);
            _repo.AddContentToDirectory(Chicken);
        }
示例#2
0
        public void Arrange()
        {
            _kcrepo  = new KomodoCafeRepo();
            _content = new KomodoCafeContent(9, "Derp", "Derpina", IngredientList.Mayonaise, 10.10m);
            _kcrepo.AddContentToDirectory(_content);

            //Stopped here because I remembered we only needed to test our methods for challenge one.
        }
示例#3
0
        private void CreateNewContent()
        {
            Console.Clear();
            KomodoCafeContent content = new KomodoCafeContent();

            Console.Write("Please enter a meal number: (ex: 1, 2, 3, etc... ");
            content.MealNumber = int.Parse(Console.ReadLine());

            Console.Write("Please enter a meal name: ");
            content.MealName = Console.ReadLine();

            Console.Write("Please enter a description: ");
            content.Description = Console.ReadLine();

            Console.WriteLine("Please select an ingredient(s): \n" +
                              "1) Lettuce \n" +
                              "2) Mayonaise \n" +
                              "3) Tomato \n" +
                              "4) Onion \n" +
                              "5) Cheese \n" +
                              "6) Patty");

            string ingredientChoice = Console.ReadLine();
            int    ingredientID     = int.Parse(ingredientChoice);

            content.Ingredient = (IngredientList)ingredientID;

            Console.Write("Please enter a price in dollars: (ex: 4.99, 6.37, 10.34, etc... ");
            content.Price = decimal.Parse(Console.ReadLine());

            bool added = _kcRepo.AddContentToDirectory(content);

            if (added)
            {
                Console.Write("Your items have been added \n" +
                              "Please press any key to continue");
                Console.ReadKey();
            }
            else
            {
                Console.Write("There has been an error, please try again \n" +
                              "Please press any key to continue");
                Console.ReadKey();
            }
        }
示例#4
0
        public void AddContentToDirectory_ShouldGetCorrectBool()
        {
            KomodoCafeContent content = new KomodoCafeContent();
            KomodoCafeRepo    repo    = new KomodoCafeRepo();

            bool addResult = repo.AddContentToDirectory(content);

            Assert.IsTrue(addResult);
        }
示例#5
0
        public void GetAllDirectory_ShouldReturnCorrectList()
        {
            KomodoCafeContent testContent = new KomodoCafeContent();
            KomodoCafeRepo    repo        = new KomodoCafeRepo();

            repo.AddContentToDirectory(testContent);

            List <KomodoCafeContent> testList = repo.GetAllContent();
            bool directoryHasContent          = testList.Contains(testContent);

            Assert.IsTrue(directoryHasContent);
        }
        //case 3
        private void CreateMenuItem()
        {
            Console.Clear();
            KomodoCafeMenu content = new KomodoCafeMenu();

            //Meal Number
            Console.WriteLine("Please enter the new item's number");
            content.MealNum = Convert.ToInt32(Console.ReadLine());
            //Meal Name
            Console.WriteLine("Please enter the item's name");
            content.MealName = Console.ReadLine();
            //Meal Description
            Console.WriteLine("Please describe the new item");
            content.MealDesc = Console.ReadLine();
            //Ingredients
            Console.WriteLine("Please list the ingredients for the new item");
            content.Ingredients = Console.ReadLine();
            //Price
            Console.WriteLine("Please list the price for the new item");
            content.Price = Convert.ToDecimal(Console.ReadLine());
            _repo.AddContentToDirectory(content);
        }