Пример #1
0
        /// <summary>
        /// lisof the complete menu
        /// </summary>
        /// <returns>List of the complete menu</returns>
        public static IEnumerable <IOrderItem> CompleteMenu()
        {
            List <IOrderItem> items = new List <IOrderItem>();

            IEnumerable <IOrderItem> Entrees = Menu.Entrees();

            foreach (IOrderItem item in Entrees)
            {
                items.Add(item);
            }

            IEnumerable <IOrderItem> Sides = Menu.Sides();

            foreach (IOrderItem item in Sides)
            {
                items.Add(item);
            }

            IEnumerable <IOrderItem> Drinks = Menu.Drinks();

            foreach (IOrderItem item in Drinks)
            {
                items.Add(item);
            }

            return(items.ToArray());
        }
Пример #2
0
        public void VerifyingEntreeSideCategoryFilter()
        {
            var filters = new List <string>
            {
                "Entree",
                "Side"
            };
            var menu    = CCMenu.All();
            var results = CCMenu.FilterByCategory(menu, filters);
            var Results = new List <string>();

            foreach (IOrderItem item in results)
            {
                Results.Add(item.ToString());
            }

            var entrees = CCMenu.Entrees();
            var sides   = CCMenu.Sides();
            var items   = new List <IOrderItem>();

            items.AddRange(entrees);
            items.AddRange(sides);
            var Items = new List <string>();

            foreach (IOrderItem item in items)
            {
                Items.Add(item.ToString());
            }

            foreach (string item in Items)
            {
                Assert.Contains(item, Results);
            }
        }
Пример #3
0
        public void VerifyingEntreesAreInEntrees()
        {
            var entrees = CCMenu.Entrees();
            var Entrees = new List <string>();

            foreach (IOrderItem item in entrees)
            {
                Entrees.Add(entrees.ToString());
            }

            var items = new List <IOrderItem>
            {
                new AngryChicken(),
                new CowpokeChili(),
                new DakotaDoubleBurger(),
                new PecosPulledPork(),
                new RustlersRibs(),
                new TexasTripleBurger(),
                new TrailBurger()
            };
            var Items = new List <string>();

            foreach (IOrderItem item in items)
            {
                Items.Add(items.ToString());
            }

            foreach (string item in Items)
            {
                Assert.Contains(item, Entrees);
            }
        }
Пример #4
0
        /// <summary>
        /// returns all menu items
        /// </summary>
        /// <returns></returns>
        public static IEnumerable <IOrderItem> CompleteMenu()
        {
            var drinks  = Menu.Drinks();
            var entrees = Menu.Entrees();
            var sides   = Menu.Sides();

            var complete = entrees.Concat(sides).Concat(drinks);

            return(complete);
        }
Пример #5
0
 static List <IOrderItem> MenuDatabase()
 {
     foreach (Entree item in Menu.Entrees())
     {
         menuItems.Add(item);
     }
     foreach (Side item in Menu.Sides())
     {
         menuItems.Add(item);
     }
     foreach (Drink item in Menu.Drinks())
     {
         menuItems.Add(item);
     }
     return(menuItems);
 }
Пример #6
0
        /// <summary>
        /// Static class returning a list of the complete menu.
        /// </summary>
        /// <returns>A list of the complete menu.</returns>
        public static IEnumerable <IOrderItem> CompleteMenu()
        {
            List <IOrderItem> menu = new List <IOrderItem>();

            foreach (IOrderItem item in Menu.Entrees())
            {
                menu.Add(item);
            }
            foreach (IOrderItem item in Menu.Sides())
            {
                menu.Add(item);
            }
            foreach (IOrderItem item in Menu.Drinks())
            {
                menu.Add(item);
            }
            return(menu);
        }
Пример #7
0
        /// <summary>
        /// A list containing single instances of all menu items
        /// </summary>
        /// <returns></returns>
        public static IEnumerable <IOrderItem> All()
        {
            List <IOrderItem> complete = new List <IOrderItem>();

            foreach (IOrderItem item in Menu.Entrees())
            {
                complete.Add(item);
            }
            foreach (IOrderItem item in Menu.Sides())
            {
                complete.Add(item);
            }
            foreach (IOrderItem item in Menu.Drinks())
            {
                complete.Add(item);
            }
            return(complete);
        }
Пример #8
0
        public static IEnumerable <IOrderItem> CompleteMenu()
        {
            List <IOrderItem> items = new List <IOrderItem>();

            foreach (Entree e in Menu.Entrees())
            {
                items.Add(e);
            }
            foreach (Side s in Menu.Sides())
            {
                items.Add(s);
            }
            foreach (Drink d in Menu.Drinks())
            {
                items.Add(d);
            }
            IEnumerable <IOrderItem> i = items;

            return(i);
        }