示例#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));
        }
示例#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));
 }
示例#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));
        }
示例#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));
 }
示例#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));
        }
示例#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));
        }
示例#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));
        }
示例#8
0
 public void ItemsShouldBeNullByDefault()
 {
     Website.Pages.IndexModel indexModel = new Website.Pages.IndexModel(new NullLogger <IndexModel>());
     Assert.Null(indexModel.Items);
 }
示例#9
0
 public void CategoriesFormShouldBeNullByDefault()
 {
     Website.Pages.IndexModel indexModel = new Website.Pages.IndexModel(new NullLogger <IndexModel>());
     Assert.Null(indexModel.Categories);
 }
示例#10
0
 public void PriceFormShouldBeNullByDefault()
 {
     Website.Pages.IndexModel indexModel = new Website.Pages.IndexModel(new NullLogger <IndexModel>());
     Assert.Null(indexModel.PriceMin);
     Assert.Null(indexModel.PriceMax);
 }