Example #1
0
        public void ItemsShouldHoldDrinksWhenCategoryIsDrinks()
        {
            Website.Pages.IndexModel indexModel = new Website.Pages.IndexModel(new NullLogger <IndexModel>());
            string[] categories = new string[] { "Drink" };
            indexModel.OnGet("", categories, 0, 2000, 0, 2000);
            indexModel.Items = Menu.FilterByCategory(indexModel.Items, indexModel.Categories);
            Assert.Collection <IOrderItem>(indexModel.Items,
                                           item => Assert.IsType <AretinoAppleJuice>(item),
                                           item => Assert.IsType <CandlehearthCoffee>(item),
                                           item => Assert.IsType <MarkarthMilk>(item),
                                           item => Assert.IsType <WarriorWater>(item),
                                           item => Assert.IsType <SailorSoda>(item),

                                           item => Assert.IsType <AretinoAppleJuice>(item),
                                           item => Assert.IsType <CandlehearthCoffee>(item),
                                           item => Assert.IsType <MarkarthMilk>(item),
                                           item => Assert.IsType <WarriorWater>(item),
                                           item => Assert.IsType <SailorSoda>(item),

                                           item => Assert.IsType <AretinoAppleJuice>(item),
                                           item => Assert.IsType <CandlehearthCoffee>(item),
                                           item => Assert.IsType <MarkarthMilk>(item),
                                           item => Assert.IsType <WarriorWater>(item),
                                           item => Assert.IsType <SailorSoda>(item));
        }
Example #2
0
 public void ItemsShouldHoldCorrectEntreesWhenMinMaxCaloriesIsSet()
 {
     Website.Pages.IndexModel indexModel = new Website.Pages.IndexModel(new NullLogger <IndexModel>());
     string[] categories = new string[0];
     indexModel.OnGet("", categories, 0, 1000, 200, 500);
     indexModel.Items = Menu.FilterByCategory(indexModel.Items, indexModel.Categories);
     Assert.Collection <IOrderItem>(indexModel.Items,
                                    item => Assert.IsType <GardenOrcOmelette>(item),
                                    item => Assert.IsType <FriedMiraak>(item),
                                    item => Assert.IsType <FriedMiraak>(item),
                                    item => Assert.IsType <SailorSoda>(item));
 }
Example #3
0
        public void ItemsShouldHoldAllItemsWhenNoCategoryIsSelected()
        {
            Website.Pages.IndexModel indexModel = new Website.Pages.IndexModel(new NullLogger <IndexModel>());
            string[] categories = new string[0];
            indexModel.OnGet("", categories, 0, 2000, 0, 2000);
            indexModel.Items = Menu.FilterByCategory(indexModel.Items, indexModel.Categories);
            Assert.Collection <IOrderItem>(indexModel.Items,

                                           item => Assert.IsType <BriarheartBurger>(item),
                                           item => Assert.IsType <DoubleDraugr>(item),
                                           item => Assert.IsType <GardenOrcOmelette>(item),
                                           item => Assert.IsType <PhillyPoacher>(item),
                                           item => Assert.IsType <SmokehouseSkeleton>(item),
                                           item => Assert.IsType <ThalmorTriple>(item),
                                           item => Assert.IsType <ThugsTBone>(item),

                                           item => Assert.IsType <DragonbornWaffleFries>(item),
                                           item => Assert.IsType <FriedMiraak>(item),
                                           item => Assert.IsType <MadOtarGrits>(item),
                                           item => Assert.IsType <VokunSalad>(item),

                                           item => Assert.IsType <AretinoAppleJuice>(item),
                                           item => Assert.IsType <CandlehearthCoffee>(item),
                                           item => Assert.IsType <MarkarthMilk>(item),
                                           item => Assert.IsType <WarriorWater>(item),
                                           item => Assert.IsType <SailorSoda>(item),

                                           item => Assert.IsType <DragonbornWaffleFries>(item),
                                           item => Assert.IsType <FriedMiraak>(item),
                                           item => Assert.IsType <MadOtarGrits>(item),
                                           item => Assert.IsType <VokunSalad>(item),

                                           item => Assert.IsType <AretinoAppleJuice>(item),
                                           item => Assert.IsType <CandlehearthCoffee>(item),
                                           item => Assert.IsType <MarkarthMilk>(item),
                                           item => Assert.IsType <WarriorWater>(item),
                                           item => Assert.IsType <SailorSoda>(item),

                                           item => Assert.IsType <DragonbornWaffleFries>(item),
                                           item => Assert.IsType <FriedMiraak>(item),
                                           item => Assert.IsType <MadOtarGrits>(item),
                                           item => Assert.IsType <VokunSalad>(item),

                                           item => Assert.IsType <AretinoAppleJuice>(item),
                                           item => Assert.IsType <CandlehearthCoffee>(item),
                                           item => Assert.IsType <MarkarthMilk>(item),
                                           item => Assert.IsType <WarriorWater>(item),
                                           item => Assert.IsType <SailorSoda>(item));
        }
Example #4
0
 public void ItemsShouldHoldEntreesWhenCategoryIsEntree()
 {
     Website.Pages.IndexModel indexModel = new Website.Pages.IndexModel(new NullLogger <IndexModel>());
     string[] categories = new string[] { "Entree" };
     indexModel.OnGet("", categories, 0, 2000, 0, 2000);
     indexModel.Items = Menu.FilterByCategory(indexModel.Items, indexModel.Categories);
     Assert.Collection <IOrderItem>(indexModel.Items,
                                    item => Assert.IsType <BriarheartBurger>(item),
                                    item => Assert.IsType <DoubleDraugr>(item),
                                    item => Assert.IsType <GardenOrcOmelette>(item),
                                    item => Assert.IsType <PhillyPoacher>(item),
                                    item => Assert.IsType <SmokehouseSkeleton>(item),
                                    item => Assert.IsType <ThalmorTriple>(item),
                                    item => Assert.IsType <ThugsTBone>(item));
 }
Example #5
0
        public void ItemsShouldHoldCorrectEntreesWhenOnlyMaxPriceIsSet()
        {
            Website.Pages.IndexModel indexModel = new Website.Pages.IndexModel(new NullLogger <IndexModel>());
            string[] categories = new string[0];
            double   max        = 4;

            indexModel.OnGet("", categories, null, max, 0, 1000);
            indexModel.Items = Menu.FilterByCategory(indexModel.Items, indexModel.Categories);
            Assert.Collection <IOrderItem>(indexModel.Items,
                                           item => Assert.IsType <DragonbornWaffleFries>(item),
                                           item => Assert.IsType <FriedMiraak>(item),
                                           item => Assert.IsType <MadOtarGrits>(item),
                                           item => Assert.IsType <VokunSalad>(item),

                                           item => Assert.IsType <AretinoAppleJuice>(item),
                                           item => Assert.IsType <CandlehearthCoffee>(item),
                                           item => Assert.IsType <MarkarthMilk>(item),
                                           item => Assert.IsType <WarriorWater>(item),
                                           item => Assert.IsType <SailorSoda>(item),

                                           item => Assert.IsType <DragonbornWaffleFries>(item),
                                           item => Assert.IsType <FriedMiraak>(item),
                                           item => Assert.IsType <MadOtarGrits>(item),
                                           item => Assert.IsType <VokunSalad>(item),

                                           item => Assert.IsType <AretinoAppleJuice>(item),
                                           item => Assert.IsType <CandlehearthCoffee>(item),
                                           item => Assert.IsType <MarkarthMilk>(item),
                                           item => Assert.IsType <WarriorWater>(item),
                                           item => Assert.IsType <SailorSoda>(item),

                                           item => Assert.IsType <DragonbornWaffleFries>(item),
                                           item => Assert.IsType <FriedMiraak>(item),
                                           item => Assert.IsType <MadOtarGrits>(item),
                                           item => Assert.IsType <VokunSalad>(item),

                                           item => Assert.IsType <AretinoAppleJuice>(item),
                                           item => Assert.IsType <CandlehearthCoffee>(item),
                                           item => Assert.IsType <MarkarthMilk>(item),
                                           item => Assert.IsType <WarriorWater>(item),
                                           item => Assert.IsType <SailorSoda>(item));
        }
Example #6
0
        public void ItemsShouldHoldCorrectEntreesWhenMinMaxPriceIsSet()
        {
            Website.Pages.IndexModel indexModel = new Website.Pages.IndexModel(new NullLogger <IndexModel>());
            string[] categories = new string[0];
            double   min        = 2;
            double   max        = 7;

            indexModel.OnGet("", categories, min, max, 0, 1000);
            indexModel.Items = Menu.FilterByCategory(indexModel.Items, indexModel.Categories);
            Assert.Collection <IOrderItem>(indexModel.Items,
                                           item => Assert.IsType <BriarheartBurger>(item),
                                           item => Assert.IsType <GardenOrcOmelette>(item),
                                           item => Assert.IsType <SmokehouseSkeleton>(item),
                                           item => Assert.IsType <ThugsTBone>(item),

                                           item => Assert.IsType <FriedMiraak>(item),
                                           item => Assert.IsType <FriedMiraak>(item),

                                           item => Assert.IsType <SailorSoda>(item));
        }
Example #7
0
        public void ItemsShouldHoldSidesWhenCategoryIsSide()
        {
            Website.Pages.IndexModel indexModel = new Website.Pages.IndexModel(new NullLogger <IndexModel>());
            string[] categories = new string[] { "Side" };
            indexModel.OnGet("", categories, 0, 2000, 0, 2000);
            indexModel.Items = Menu.FilterByCategory(indexModel.Items, indexModel.Categories);
            Assert.Collection <IOrderItem>(indexModel.Items,
                                           item => Assert.IsType <DragonbornWaffleFries>(item),
                                           item => Assert.IsType <FriedMiraak>(item),
                                           item => Assert.IsType <MadOtarGrits>(item),
                                           item => Assert.IsType <VokunSalad>(item),

                                           item => Assert.IsType <DragonbornWaffleFries>(item),
                                           item => Assert.IsType <FriedMiraak>(item),
                                           item => Assert.IsType <MadOtarGrits>(item),
                                           item => Assert.IsType <VokunSalad>(item),

                                           item => Assert.IsType <DragonbornWaffleFries>(item),
                                           item => Assert.IsType <FriedMiraak>(item),
                                           item => Assert.IsType <MadOtarGrits>(item),
                                           item => Assert.IsType <VokunSalad>(item));
        }