Exemple #1
0
        public void VerifyingCaloriesMinAndMaxFilter()
        {
            var  menu        = CCMenu.All();
            uint CaloriesMin = 300;
            uint CaloriesMax = 500;
            var  results     = CCMenu.FilterByCalories(menu, CaloriesMin, CaloriesMax);
            var  Results     = new List <string>();

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

            var items = new List <IOrderItem>
            {
                new DakotaDoubleBurger(),
                new BakedBeans(Size.Small),
                new BakedBeans(Size.Medium),
                new BakedBeans(Size.Large),
                new PanDeCampo(Size.Large)
            };
            var Items = new List <string>();

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

            foreach (string item in Items)
            {
                Assert.Contains(item, Results);
            }
        }
Exemple #2
0
        public void VerifyingCaloriesMinFilter()
        {
            var  menu        = CCMenu.All();
            uint CaloriesMin = 600;
            var  results     = CCMenu.FilterByCalories(menu, CaloriesMin, null);
            var  Results     = new List <string>();

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

            var items = new List <IOrderItem>
            {
                new RustlersRibs(),
                new TexasTripleBurger(),
                new ChiliCheeseFries(Size.Large),
                new CornDodgers(Size.Medium),
                new CornDodgers(Size.Large)
            };
            var Items = new List <string>();

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

            foreach (string item in Items)
            {
                Assert.Contains(item, Results);
            }
        }
Exemple #3
0
        public void VerifyingCaloriesMaxFilter()
        {
            var  menu        = CCMenu.All();
            uint CaloriesMax = 100;
            var  results     = CCMenu.FilterByCalories(menu, null, CaloriesMax);
            var  Results     = new List <string>();

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

            var items = new List <IOrderItem>
            {
                new CowboyCoffee(Size.Small),
                new CowboyCoffee(Size.Medium),
                new CowboyCoffee(Size.Large),
                new TexasTea(Size.Small),
                new TexasTea(Size.Medium),
                new TexasTea(Size.Large),
                new Water()
            };
            var Items = new List <string>();

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

            foreach (string item in Items)
            {
                Assert.Contains(item, Results);
            }
        }
Exemple #4
0
        public void VerifyingNullCaloriesFilter()
        {
            var menu    = CCMenu.All();
            var results = CCMenu.FilterByCalories(menu, null, null);
            var Results = new List <string>();

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

            var items = CCMenu.All();
            var Items = new List <string>();

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

            foreach (string item in Items)
            {
                Assert.Contains(item, Results);
            }
        }