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