public void ShouldHaveCorrectToStringBasedOnSizeAndFlavor(SodaFlavor flavor, Size size, string name) { SailorSoda ss = new SailorSoda(); ss.Size = size; ss.Flavor = flavor; Assert.Equal(name, ss.ToString()); }
public void ShouldHaveCorrectToStringBasedOnSizeAndFlavor(SodaFlavor flavor, Size size, string name) { SailorSoda sailorSoda = new SailorSoda(); sailorSoda.Flavor = flavor; sailorSoda.Size = size; Assert.Equal(sailorSoda.ToString(), name); }
public void WrongSizeShouldThrowException() { SailorSoda ss = new SailorSoda(); ss.Size = (Size)(int.MaxValue); Assert.Throws <System.NotImplementedException>(() => ss.Calories); Assert.Throws <System.NotImplementedException>(() => ss.Price); Assert.Throws <System.NotImplementedException>(() => ss.ToString()); }
public void ShouldHaveCorrectToStringBasedOnSizeAndFlavor(SodaFlavor flavor, Size size, string name) { var SS = new SailorSoda() { Size = size, Flavor = flavor }; Assert.Equal(SS.ToString(), name); }
public void ShouldHaveCorrectToStringBasedOnSizeAndFlavor(SodaFlavor flavor, Size size, string name) { SailorSoda item = new SailorSoda() { Flavor = flavor, Size = size }; Assert.Equal(name, item.ToString()); }
public void ShouldHaveCorrectToStringBasedOnSizeAndFlavor(SodaFlavor flavor, Size size, string name) { SailorSoda ss = new SailorSoda(); ss.Size = size; if (flavor == SodaFlavor.Blackberry) { Assert.Equal(name, ss.ToString()); } else if (flavor == SodaFlavor.Cherry) { Assert.Equal(name, ss.ToString()); } else if (flavor == SodaFlavor.Grapefruit) { Assert.Equal(name, ss.ToString()); } else if (flavor == SodaFlavor.Lemon) { Assert.Equal(name, ss.ToString()); } else if (flavor == SodaFlavor.Peach) { Assert.Equal(name, ss.ToString()); } else { Assert.Equal(name, ss.ToString()); } }
void DrinksListShouldReturnCorrectList(Size size, SodaFlavor flavor) { List <IOrderItem> drinks = Menu.Drinks(); Assert.Contains(drinks, item => { CandlehearthCoffee c = new CandlehearthCoffee(); c.Size = size; return(item.ToString().Equals(c.ToString())); }); Assert.Contains(drinks, item => { AretinoAppleJuice a = new AretinoAppleJuice(); a.Size = size; return(item.ToString().Equals(a.ToString())); }); Assert.Contains(drinks, item => { MarkarthMilk m = new MarkarthMilk(); m.Size = size; return(item.ToString().Equals(m.ToString())); }); Assert.Contains(drinks, item => { WarriorWater w = new WarriorWater(); w.Size = size; return(item.ToString().Equals(w.ToString())); }); Assert.Contains(drinks, item => { SailorSoda s = new SailorSoda(); s.Size = size; s.Flavor = flavor; return(item.ToString().Equals(s.ToString())); }); Assert.Equal(30, drinks.Count); }
void FullMenuShouldHaveAllDrinks(Size size, SodaFlavor flavor) { List <IOrderItem> fullMenu = Menu.FullMenu(); Assert.Contains(fullMenu, item => { CandlehearthCoffee c = new CandlehearthCoffee(); c.Size = size; return(item.ToString().Equals(c.ToString())); }); Assert.Contains(fullMenu, item => { AretinoAppleJuice a = new AretinoAppleJuice(); a.Size = size; return(item.ToString().Equals(a.ToString())); }); Assert.Contains(fullMenu, item => { MarkarthMilk m = new MarkarthMilk(); m.Size = size; return(item.ToString().Equals(m.ToString())); }); Assert.Contains(fullMenu, item => { WarriorWater w = new WarriorWater(); w.Size = size; return(item.ToString().Equals(w.ToString())); }); Assert.Contains(fullMenu, item => { SailorSoda s = new SailorSoda(); s.Size = size; s.Flavor = flavor; return(item.ToString().Equals(s.ToString())); }); }
public void ShouldGetCorrectSpecialInstrcutions() { Combo a = new Combo(); BriarheartBurger b = new BriarheartBurger(); b.Cheese = false; SailorSoda s = new SailorSoda(); s.Size = Size.Large; FriedMiraak f = new FriedMiraak(); f.Size = Size.Medium; a.Side = f; a.Drink = s; a.Entree = b; Assert.Contains("Hold cheese", a.SpecialInstructions); Assert.Contains(f.ToString(), a.SpecialInstructions); Assert.Contains(s.ToString(), a.SpecialInstructions); Assert.Contains(b.ToString(), a.SpecialInstructions); }
public void ShouldGetAllDrinks() { AretinoAppleJuice smallJuice = new AretinoAppleJuice(); AretinoAppleJuice mediumJuice = new AretinoAppleJuice(); mediumJuice.Size = Size.Medium; AretinoAppleJuice largeJuice = new AretinoAppleJuice(); largeJuice.Size = Size.Large; CandlehearthCoffee smallCoffee = new CandlehearthCoffee(); CandlehearthCoffee mediumCoffee = new CandlehearthCoffee(); mediumCoffee.Size = Size.Medium; CandlehearthCoffee largeCoffee = new CandlehearthCoffee(); largeCoffee.Size = Size.Large; CandlehearthCoffee smallDecafCoffee = new CandlehearthCoffee(); smallDecafCoffee.Decaf = true; CandlehearthCoffee mediumDecafCoffee = new CandlehearthCoffee(); mediumDecafCoffee.Size = Size.Medium; mediumDecafCoffee.Decaf = true; CandlehearthCoffee largeDecafCoffee = new CandlehearthCoffee(); largeDecafCoffee.Size = Size.Large; largeDecafCoffee.Decaf = true; MarkarthMilk smallMilk = new MarkarthMilk(); MarkarthMilk mediumMilk = new MarkarthMilk(); mediumMilk.Size = Size.Medium; MarkarthMilk largeMilk = new MarkarthMilk(); largeMilk.Size = Size.Large; SailorSoda smallCherrySoda = new SailorSoda(); SailorSoda mediumCherrySoda = new SailorSoda(); mediumCherrySoda.Size = Size.Medium; SailorSoda largeCherrySoda = new SailorSoda(); largeCherrySoda.Size = Size.Large; SailorSoda smallBerrySoda = new SailorSoda(); smallBerrySoda.Flavor = SodaFlavor.Blackberry; SailorSoda mediumBerrySoda = new SailorSoda(); mediumBerrySoda.Size = Size.Medium; mediumBerrySoda.Flavor = SodaFlavor.Blackberry; SailorSoda largeBerrySoda = new SailorSoda(); largeBerrySoda.Size = Size.Large; largeBerrySoda.Flavor = SodaFlavor.Blackberry; SailorSoda smallFruitSoda = new SailorSoda(); smallFruitSoda.Flavor = SodaFlavor.Grapefruit; SailorSoda mediumFruitSoda = new SailorSoda(); mediumFruitSoda.Size = Size.Medium; mediumFruitSoda.Flavor = SodaFlavor.Grapefruit; SailorSoda largeFruitSoda = new SailorSoda(); largeFruitSoda.Size = Size.Large; largeFruitSoda.Flavor = SodaFlavor.Grapefruit; SailorSoda smallLemonSoda = new SailorSoda(); smallLemonSoda.Flavor = SodaFlavor.Lemon; SailorSoda mediumLemonSoda = new SailorSoda(); mediumLemonSoda.Size = Size.Medium; mediumLemonSoda.Flavor = SodaFlavor.Lemon; SailorSoda largeLemonSoda = new SailorSoda(); largeLemonSoda.Size = Size.Large; largeLemonSoda.Flavor = SodaFlavor.Lemon; SailorSoda smallPeachSoda = new SailorSoda(); smallPeachSoda.Flavor = SodaFlavor.Peach; SailorSoda mediumPeachSoda = new SailorSoda(); mediumPeachSoda.Size = Size.Medium; mediumPeachSoda.Flavor = SodaFlavor.Peach; SailorSoda largePeachSoda = new SailorSoda(); largePeachSoda.Size = Size.Large; largePeachSoda.Flavor = SodaFlavor.Peach; SailorSoda smallMelonSoda = new SailorSoda(); smallMelonSoda.Flavor = SodaFlavor.Watermelon; SailorSoda mediumMelonSoda = new SailorSoda(); mediumMelonSoda.Size = Size.Medium; mediumMelonSoda.Flavor = SodaFlavor.Watermelon; SailorSoda largeMelonSoda = new SailorSoda(); largeMelonSoda.Size = Size.Large; largeMelonSoda.Flavor = SodaFlavor.Watermelon; WarriorWater smallWater = new WarriorWater(); WarriorWater mediumWater = new WarriorWater(); mediumWater.Size = Size.Medium; WarriorWater largeWater = new WarriorWater(); largeWater.Size = Size.Large; Assert.Collection <IOrderItem>(Menu.Drinks(), item => Assert.Equal(item.ToString(), smallJuice.ToString()), item => Assert.Equal(item.ToString(), mediumJuice.ToString()), item => Assert.Equal(item.ToString(), largeJuice.ToString()), item => Assert.Equal(item.ToString(), smallCoffee.ToString()), item => Assert.Equal(item.ToString(), mediumCoffee.ToString()), item => Assert.Equal(item.ToString(), largeCoffee.ToString()), item => Assert.Equal(item.ToString(), smallDecafCoffee.ToString()), item => Assert.Equal(item.ToString(), mediumDecafCoffee.ToString()), item => Assert.Equal(item.ToString(), largeDecafCoffee.ToString()), item => Assert.Equal(item.ToString(), smallMilk.ToString()), item => Assert.Equal(item.ToString(), mediumMilk.ToString()), item => Assert.Equal(item.ToString(), largeMilk.ToString()), item => Assert.Equal(item.ToString(), smallCherrySoda.ToString()), item => Assert.Equal(item.ToString(), mediumCherrySoda.ToString()), item => Assert.Equal(item.ToString(), largeCherrySoda.ToString()), item => Assert.Equal(item.ToString(), smallBerrySoda.ToString()), item => Assert.Equal(item.ToString(), mediumBerrySoda.ToString()), item => Assert.Equal(item.ToString(), largeBerrySoda.ToString()), item => Assert.Equal(item.ToString(), smallFruitSoda.ToString()), item => Assert.Equal(item.ToString(), mediumFruitSoda.ToString()), item => Assert.Equal(item.ToString(), largeFruitSoda.ToString()), item => Assert.Equal(item.ToString(), smallLemonSoda.ToString()), item => Assert.Equal(item.ToString(), mediumLemonSoda.ToString()), item => Assert.Equal(item.ToString(), largeLemonSoda.ToString()), item => Assert.Equal(item.ToString(), smallPeachSoda.ToString()), item => Assert.Equal(item.ToString(), mediumPeachSoda.ToString()), item => Assert.Equal(item.ToString(), largePeachSoda.ToString()), item => Assert.Equal(item.ToString(), smallMelonSoda.ToString()), item => Assert.Equal(item.ToString(), mediumMelonSoda.ToString()), item => Assert.Equal(item.ToString(), largeMelonSoda.ToString()), item => Assert.Equal(item.ToString(), smallWater.ToString()), item => Assert.Equal(item.ToString(), mediumWater.ToString()), item => Assert.Equal(item.ToString(), largeWater.ToString())); }
public void ShouldHaveCorrectNameBasedOnSizeAndFlavor(SodaFlavor flavor, Size size) { var SS = new SailorSoda() { Flavor = flavor, Size = size }; if (size == Size.Small) { switch (flavor) { case SodaFlavor.Blackberry: Assert.Equal("Small Blackberry Sailor Soda", SS.ToString()); break; case SodaFlavor.Cherry: Assert.Equal("Small Cherry Sailor Soda", SS.ToString()); break; case SodaFlavor.Grapefruit: Assert.Equal("Small Grapefruit Sailor Soda", SS.ToString()); break; case SodaFlavor.Lemon: Assert.Equal("Small Lemon Sailor Soda", SS.ToString()); break; case SodaFlavor.Peach: Assert.Equal("Small Peach Sailor Soda", SS.ToString()); break; case SodaFlavor.Watermelon: Assert.Equal("Small Watermelon Sailor Soda", SS.ToString()); break; default: throw new NotImplementedException(); } } if (size == Size.Medium) { switch (flavor) { case SodaFlavor.Blackberry: Assert.Equal("Medium Blackberry Sailor Soda", SS.ToString()); break; case SodaFlavor.Cherry: Assert.Equal("Medium Cherry Sailor Soda", SS.ToString()); break; case SodaFlavor.Grapefruit: Assert.Equal("Medium Grapefruit Sailor Soda", SS.ToString()); break; case SodaFlavor.Lemon: Assert.Equal("Medium Lemon Sailor Soda", SS.ToString()); break; case SodaFlavor.Peach: Assert.Equal("Medium Peach Sailor Soda", SS.ToString()); break; case SodaFlavor.Watermelon: Assert.Equal("Medium Watermelon Sailor Soda", SS.ToString()); break; default: throw new NotImplementedException(); } } if (size == Size.Large) { switch (flavor) { case SodaFlavor.Blackberry: Assert.Equal("Large Blackberry Sailor Soda", SS.ToString()); break; case SodaFlavor.Cherry: Assert.Equal("Large Cherry Sailor Soda", SS.ToString()); break; case SodaFlavor.Grapefruit: Assert.Equal("Large Grapefruit Sailor Soda", SS.ToString()); break; case SodaFlavor.Lemon: Assert.Equal("Large Lemon Sailor Soda", SS.ToString()); break; case SodaFlavor.Peach: Assert.Equal("Large Peach Sailor Soda", SS.ToString()); break; case SodaFlavor.Watermelon: Assert.Equal("Large Watermelon Sailor Soda", SS.ToString()); break; default: throw new NotImplementedException(); } } }
public void ShouldGetFullMenu() { BriarheartBurger bb = new BriarheartBurger(); DoubleDraugr dd = new DoubleDraugr(); GardenOrcOmelette goo = new GardenOrcOmelette(); PhillyPoacher pp = new PhillyPoacher(); SmokehouseSkeleton ss = new SmokehouseSkeleton(); ThalmorTriple tt = new ThalmorTriple(); ThugsTBone ttb = new ThugsTBone(); DragonbornWaffleFries smallFries = new DragonbornWaffleFries(); DragonbornWaffleFries mediumFries = new DragonbornWaffleFries(); mediumFries.Size = Size.Medium; DragonbornWaffleFries largeFries = new DragonbornWaffleFries(); largeFries.Size = Size.Large; FriedMiraak smallMiraak = new FriedMiraak(); FriedMiraak mediumMiraak = new FriedMiraak(); mediumMiraak.Size = Size.Medium; FriedMiraak largeMiraak = new FriedMiraak(); largeMiraak.Size = Size.Large; MadOtarGrits smallGrits = new MadOtarGrits(); MadOtarGrits mediumGrits = new MadOtarGrits(); mediumGrits.Size = Size.Medium; MadOtarGrits largeGrits = new MadOtarGrits(); largeGrits.Size = Size.Large; VokunSalad smallSalad = new VokunSalad(); VokunSalad mediumSalad = new VokunSalad(); mediumSalad.Size = Size.Medium; VokunSalad largeSalad = new VokunSalad(); largeSalad.Size = Size.Large; AretinoAppleJuice smallJuice = new AretinoAppleJuice(); AretinoAppleJuice mediumJuice = new AretinoAppleJuice(); mediumJuice.Size = Size.Medium; AretinoAppleJuice largeJuice = new AretinoAppleJuice(); largeJuice.Size = Size.Large; CandlehearthCoffee smallCoffee = new CandlehearthCoffee(); CandlehearthCoffee mediumCoffee = new CandlehearthCoffee(); mediumCoffee.Size = Size.Medium; CandlehearthCoffee largeCoffee = new CandlehearthCoffee(); largeCoffee.Size = Size.Large; CandlehearthCoffee smallDecafCoffee = new CandlehearthCoffee(); smallDecafCoffee.Decaf = true; CandlehearthCoffee mediumDecafCoffee = new CandlehearthCoffee(); mediumDecafCoffee.Size = Size.Medium; mediumDecafCoffee.Decaf = true; CandlehearthCoffee largeDecafCoffee = new CandlehearthCoffee(); largeDecafCoffee.Size = Size.Large; largeDecafCoffee.Decaf = true; MarkarthMilk smallMilk = new MarkarthMilk(); MarkarthMilk mediumMilk = new MarkarthMilk(); mediumMilk.Size = Size.Medium; MarkarthMilk largeMilk = new MarkarthMilk(); largeMilk.Size = Size.Large; SailorSoda smallCherrySoda = new SailorSoda(); SailorSoda mediumCherrySoda = new SailorSoda(); mediumCherrySoda.Size = Size.Medium; SailorSoda largeCherrySoda = new SailorSoda(); largeCherrySoda.Size = Size.Large; SailorSoda smallBerrySoda = new SailorSoda(); smallBerrySoda.Flavor = SodaFlavor.Blackberry; SailorSoda mediumBerrySoda = new SailorSoda(); mediumBerrySoda.Size = Size.Medium; mediumBerrySoda.Flavor = SodaFlavor.Blackberry; SailorSoda largeBerrySoda = new SailorSoda(); largeBerrySoda.Size = Size.Large; largeBerrySoda.Flavor = SodaFlavor.Blackberry; SailorSoda smallFruitSoda = new SailorSoda(); smallFruitSoda.Flavor = SodaFlavor.Grapefruit; SailorSoda mediumFruitSoda = new SailorSoda(); mediumFruitSoda.Size = Size.Medium; mediumFruitSoda.Flavor = SodaFlavor.Grapefruit; SailorSoda largeFruitSoda = new SailorSoda(); largeFruitSoda.Size = Size.Large; largeFruitSoda.Flavor = SodaFlavor.Grapefruit; SailorSoda smallLemonSoda = new SailorSoda(); smallLemonSoda.Flavor = SodaFlavor.Lemon; SailorSoda mediumLemonSoda = new SailorSoda(); mediumLemonSoda.Size = Size.Medium; mediumLemonSoda.Flavor = SodaFlavor.Lemon; SailorSoda largeLemonSoda = new SailorSoda(); largeLemonSoda.Size = Size.Large; largeLemonSoda.Flavor = SodaFlavor.Lemon; SailorSoda smallPeachSoda = new SailorSoda(); smallPeachSoda.Flavor = SodaFlavor.Peach; SailorSoda mediumPeachSoda = new SailorSoda(); mediumPeachSoda.Size = Size.Medium; mediumPeachSoda.Flavor = SodaFlavor.Peach; SailorSoda largePeachSoda = new SailorSoda(); largePeachSoda.Size = Size.Large; largePeachSoda.Flavor = SodaFlavor.Peach; SailorSoda smallMelonSoda = new SailorSoda(); smallMelonSoda.Flavor = SodaFlavor.Watermelon; SailorSoda mediumMelonSoda = new SailorSoda(); mediumMelonSoda.Size = Size.Medium; mediumMelonSoda.Flavor = SodaFlavor.Watermelon; SailorSoda largeMelonSoda = new SailorSoda(); largeMelonSoda.Size = Size.Large; largeMelonSoda.Flavor = SodaFlavor.Watermelon; WarriorWater smallWater = new WarriorWater(); WarriorWater mediumWater = new WarriorWater(); mediumWater.Size = Size.Medium; WarriorWater largeWater = new WarriorWater(); largeWater.Size = Size.Large; Assert.Collection <IOrderItem>(Menu.FullMenu(), item => Assert.Equal(item.ToString(), bb.ToString()), item => Assert.Equal(item.ToString(), dd.ToString()), item => Assert.Equal(item.ToString(), goo.ToString()), item => Assert.Equal(item.ToString(), pp.ToString()), item => Assert.Equal(item.ToString(), ss.ToString()), item => Assert.Equal(item.ToString(), tt.ToString()), item => Assert.Equal(item.ToString(), ttb.ToString()), item => Assert.Equal(item.ToString(), smallFries.ToString()), item => Assert.Equal(item.ToString(), mediumFries.ToString()), item => Assert.Equal(item.ToString(), largeFries.ToString()), item => Assert.Equal(item.ToString(), smallMiraak.ToString()), item => Assert.Equal(item.ToString(), mediumMiraak.ToString()), item => Assert.Equal(item.ToString(), largeMiraak.ToString()), item => Assert.Equal(item.ToString(), smallGrits.ToString()), item => Assert.Equal(item.ToString(), mediumGrits.ToString()), item => Assert.Equal(item.ToString(), largeGrits.ToString()), item => Assert.Equal(item.ToString(), smallSalad.ToString()), item => Assert.Equal(item.ToString(), mediumSalad.ToString()), item => Assert.Equal(item.ToString(), largeSalad.ToString()), item => Assert.Equal(item.ToString(), smallJuice.ToString()), item => Assert.Equal(item.ToString(), mediumJuice.ToString()), item => Assert.Equal(item.ToString(), largeJuice.ToString()), item => Assert.Equal(item.ToString(), smallCoffee.ToString()), item => Assert.Equal(item.ToString(), mediumCoffee.ToString()), item => Assert.Equal(item.ToString(), largeCoffee.ToString()), item => Assert.Equal(item.ToString(), smallDecafCoffee.ToString()), item => Assert.Equal(item.ToString(), mediumDecafCoffee.ToString()), item => Assert.Equal(item.ToString(), largeDecafCoffee.ToString()), item => Assert.Equal(item.ToString(), smallMilk.ToString()), item => Assert.Equal(item.ToString(), mediumMilk.ToString()), item => Assert.Equal(item.ToString(), largeMilk.ToString()), item => Assert.Equal(item.ToString(), smallCherrySoda.ToString()), item => Assert.Equal(item.ToString(), mediumCherrySoda.ToString()), item => Assert.Equal(item.ToString(), largeCherrySoda.ToString()), item => Assert.Equal(item.ToString(), smallBerrySoda.ToString()), item => Assert.Equal(item.ToString(), mediumBerrySoda.ToString()), item => Assert.Equal(item.ToString(), largeBerrySoda.ToString()), item => Assert.Equal(item.ToString(), smallFruitSoda.ToString()), item => Assert.Equal(item.ToString(), mediumFruitSoda.ToString()), item => Assert.Equal(item.ToString(), largeFruitSoda.ToString()), item => Assert.Equal(item.ToString(), smallLemonSoda.ToString()), item => Assert.Equal(item.ToString(), mediumLemonSoda.ToString()), item => Assert.Equal(item.ToString(), largeLemonSoda.ToString()), item => Assert.Equal(item.ToString(), smallPeachSoda.ToString()), item => Assert.Equal(item.ToString(), mediumPeachSoda.ToString()), item => Assert.Equal(item.ToString(), largePeachSoda.ToString()), item => Assert.Equal(item.ToString(), smallMelonSoda.ToString()), item => Assert.Equal(item.ToString(), mediumMelonSoda.ToString()), item => Assert.Equal(item.ToString(), largeMelonSoda.ToString()), item => Assert.Equal(item.ToString(), smallWater.ToString()), item => Assert.Equal(item.ToString(), mediumWater.ToString()), item => Assert.Equal(item.ToString(), largeWater.ToString())); }
public void NameShouldReturnToString() { SailorSoda x = new SailorSoda(); Assert.Equal(x.ToString(), x.Name); }
public void DrinkListContainsAllDrinks() { AretinoAppleJuice aj0 = new AretinoAppleJuice() { Size = Size.Small }; AretinoAppleJuice aj1 = new AretinoAppleJuice() { Size = Size.Medium }; AretinoAppleJuice aj2 = new AretinoAppleJuice() { Size = Size.Large }; MarkarthMilk mm0 = new MarkarthMilk() { Size = Size.Small }; MarkarthMilk mm1 = new MarkarthMilk() { Size = Size.Medium }; MarkarthMilk mm2 = new MarkarthMilk() { Size = Size.Large }; CandlehearthCoffee chc0 = new CandlehearthCoffee() { Size = Size.Small }; CandlehearthCoffee chc1 = new CandlehearthCoffee() { Size = Size.Medium }; CandlehearthCoffee chc2 = new CandlehearthCoffee() { Size = Size.Large }; WarriorWater ww0 = new WarriorWater() { Size = Size.Small }; WarriorWater ww1 = new WarriorWater() { Size = Size.Medium }; WarriorWater ww2 = new WarriorWater() { Size = Size.Large }; SailorSoda ss0 = new SailorSoda() { Size = Size.Small, SodaFlavor = Flavor.Blackberry }; SailorSoda ss1 = new SailorSoda() { Size = Size.Medium, SodaFlavor = Flavor.Blackberry }; SailorSoda ss2 = new SailorSoda() { Size = Size.Large, SodaFlavor = Flavor.Blackberry }; SailorSoda ss3 = new SailorSoda() { Size = Size.Small, SodaFlavor = Flavor.Cherry }; SailorSoda ss4 = new SailorSoda() { Size = Size.Medium, SodaFlavor = Flavor.Cherry }; SailorSoda ss5 = new SailorSoda() { Size = Size.Large, SodaFlavor = Flavor.Cherry }; SailorSoda ss6 = new SailorSoda() { Size = Size.Small, SodaFlavor = Flavor.Grapefruit }; SailorSoda ss7 = new SailorSoda() { Size = Size.Medium, SodaFlavor = Flavor.Grapefruit }; SailorSoda ss8 = new SailorSoda() { Size = Size.Large, SodaFlavor = Flavor.Grapefruit }; SailorSoda ss9 = new SailorSoda() { Size = Size.Small, SodaFlavor = Flavor.Lemon }; SailorSoda ss10 = new SailorSoda() { Size = Size.Medium, SodaFlavor = Flavor.Lemon }; SailorSoda ss11 = new SailorSoda() { Size = Size.Large, SodaFlavor = Flavor.Lemon }; SailorSoda ss12 = new SailorSoda() { Size = Size.Small, SodaFlavor = Flavor.Peach }; SailorSoda ss13 = new SailorSoda() { Size = Size.Medium, SodaFlavor = Flavor.Peach }; SailorSoda ss14 = new SailorSoda() { Size = Size.Large, SodaFlavor = Flavor.Peach }; SailorSoda ss15 = new SailorSoda() { Size = Size.Small, SodaFlavor = Flavor.Watermelon }; SailorSoda ss16 = new SailorSoda() { Size = Size.Medium, SodaFlavor = Flavor.Watermelon }; SailorSoda ss17 = new SailorSoda() { Size = Size.Large, SodaFlavor = Flavor.Watermelon }; List <IOrderItem> drinkList = (List <IOrderItem>)Menu.Drinks(); foreach (IOrderItem item in drinkList) { Assert.Contains(drinkList, item => item.ToString().Equals(aj0.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(aj1.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(aj2.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(chc0.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(chc1.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(chc2.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(mm0.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(mm1.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(mm2.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(ww0.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(ww1.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(ww2.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(ss0.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(ss1.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(ss2.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(ss3.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(ss4.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(ss5.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(ss6.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(ss7.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(ss8.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(ss9.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(ss10.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(ss11.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(ss12.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(ss13.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(ss14.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(ss15.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(ss16.ToString())); Assert.Contains(drinkList, item => item.ToString().Equals(ss17.ToString())); } }
public void MenuContainsAllMenuItems() { BriarheartBurger bb = new BriarheartBurger(); DoubleDraugr db = new DoubleDraugr(); GardenOrcOmelette goo = new GardenOrcOmelette(); PhillyPoacher pp = new PhillyPoacher(); SmokehouseSkeleton ss = new SmokehouseSkeleton(); ThalmorTriple tt = new ThalmorTriple(); ThugsT_Bone ttb = new ThugsT_Bone(); AretinoAppleJuice aj0 = new AretinoAppleJuice() { Size = Size.Small }; AretinoAppleJuice aj1 = new AretinoAppleJuice() { Size = Size.Medium }; AretinoAppleJuice aj2 = new AretinoAppleJuice() { Size = Size.Large }; MarkarthMilk mm0 = new MarkarthMilk() { Size = Size.Small }; MarkarthMilk mm1 = new MarkarthMilk() { Size = Size.Medium }; MarkarthMilk mm2 = new MarkarthMilk() { Size = Size.Large }; CandlehearthCoffee chc0 = new CandlehearthCoffee() { Size = Size.Small }; CandlehearthCoffee chc1 = new CandlehearthCoffee() { Size = Size.Medium }; CandlehearthCoffee chc2 = new CandlehearthCoffee() { Size = Size.Large }; WarriorWater ww0 = new WarriorWater() { Size = Size.Small }; WarriorWater ww1 = new WarriorWater() { Size = Size.Medium }; WarriorWater ww2 = new WarriorWater() { Size = Size.Large }; SailorSoda ss0 = new SailorSoda() { Size = Size.Small, SodaFlavor = Flavor.Blackberry }; SailorSoda ss1 = new SailorSoda() { Size = Size.Medium, SodaFlavor = Flavor.Blackberry }; SailorSoda ss2 = new SailorSoda() { Size = Size.Large, SodaFlavor = Flavor.Blackberry }; SailorSoda ss3 = new SailorSoda() { Size = Size.Small, SodaFlavor = Flavor.Cherry }; SailorSoda ss4 = new SailorSoda() { Size = Size.Medium, SodaFlavor = Flavor.Cherry }; SailorSoda ss5 = new SailorSoda() { Size = Size.Large, SodaFlavor = Flavor.Cherry }; SailorSoda ss6 = new SailorSoda() { Size = Size.Small, SodaFlavor = Flavor.Grapefruit }; SailorSoda ss7 = new SailorSoda() { Size = Size.Medium, SodaFlavor = Flavor.Grapefruit }; SailorSoda ss8 = new SailorSoda() { Size = Size.Large, SodaFlavor = Flavor.Grapefruit }; SailorSoda ss9 = new SailorSoda() { Size = Size.Small, SodaFlavor = Flavor.Lemon }; SailorSoda ss10 = new SailorSoda() { Size = Size.Medium, SodaFlavor = Flavor.Lemon }; SailorSoda ss11 = new SailorSoda() { Size = Size.Large, SodaFlavor = Flavor.Lemon }; SailorSoda ss12 = new SailorSoda() { Size = Size.Small, SodaFlavor = Flavor.Peach }; SailorSoda ss13 = new SailorSoda() { Size = Size.Medium, SodaFlavor = Flavor.Peach }; SailorSoda ss14 = new SailorSoda() { Size = Size.Large, SodaFlavor = Flavor.Peach }; SailorSoda ss15 = new SailorSoda() { Size = Size.Small, SodaFlavor = Flavor.Watermelon }; SailorSoda ss16 = new SailorSoda() { Size = Size.Medium, SodaFlavor = Flavor.Watermelon }; SailorSoda ss17 = new SailorSoda() { Size = Size.Large, SodaFlavor = Flavor.Watermelon }; DragonbornWaffleFries df0 = new DragonbornWaffleFries() { Size = Size.Small }; DragonbornWaffleFries df1 = new DragonbornWaffleFries() { Size = Size.Medium }; DragonbornWaffleFries df2 = new DragonbornWaffleFries() { Size = Size.Large }; FriedMiraak fm0 = new FriedMiraak() { Size = Size.Small }; FriedMiraak fm1 = new FriedMiraak() { Size = Size.Medium }; FriedMiraak fm2 = new FriedMiraak() { Size = Size.Large }; MadOtarGrits mog0 = new MadOtarGrits() { Size = Size.Small }; MadOtarGrits mog1 = new MadOtarGrits() { Size = Size.Medium }; MadOtarGrits mog2 = new MadOtarGrits() { Size = Size.Large }; VokunSalad vs0 = new VokunSalad() { Size = Size.Small }; VokunSalad vs1 = new VokunSalad() { Size = Size.Medium }; VokunSalad vs2 = new VokunSalad() { Size = Size.Large }; List <IOrderItem> menu = (List <IOrderItem>)Menu.FullMenu(); foreach (IOrderItem item in menu) { Assert.Contains(menu, item => item.ToString().Equals(bb.ToString())); Assert.Contains(menu, item => item.ToString().Equals(db.ToString())); Assert.Contains(menu, item => item.ToString().Equals(goo.ToString())); Assert.Contains(menu, item => item.ToString().Equals(pp.ToString())); Assert.Contains(menu, item => item.ToString().Equals(ss.ToString())); Assert.Contains(menu, item => item.ToString().Equals(tt.ToString())); Assert.Contains(menu, item => item.ToString().Equals(ttb.ToString())); Assert.Contains(menu, item => item.ToString().Equals(aj0.ToString())); Assert.Contains(menu, item => item.ToString().Equals(aj1.ToString())); Assert.Contains(menu, item => item.ToString().Equals(aj2.ToString())); Assert.Contains(menu, item => item.ToString().Equals(chc0.ToString())); Assert.Contains(menu, item => item.ToString().Equals(chc1.ToString())); Assert.Contains(menu, item => item.ToString().Equals(chc2.ToString())); Assert.Contains(menu, item => item.ToString().Equals(mm0.ToString())); Assert.Contains(menu, item => item.ToString().Equals(mm1.ToString())); Assert.Contains(menu, item => item.ToString().Equals(mm2.ToString())); Assert.Contains(menu, item => item.ToString().Equals(ww0.ToString())); Assert.Contains(menu, item => item.ToString().Equals(ww1.ToString())); Assert.Contains(menu, item => item.ToString().Equals(ww2.ToString())); Assert.Contains(menu, item => item.ToString().Equals(ss0.ToString())); Assert.Contains(menu, item => item.ToString().Equals(ss1.ToString())); Assert.Contains(menu, item => item.ToString().Equals(ss2.ToString())); Assert.Contains(menu, item => item.ToString().Equals(ss3.ToString())); Assert.Contains(menu, item => item.ToString().Equals(ss4.ToString())); Assert.Contains(menu, item => item.ToString().Equals(ss5.ToString())); Assert.Contains(menu, item => item.ToString().Equals(ss6.ToString())); Assert.Contains(menu, item => item.ToString().Equals(ss7.ToString())); Assert.Contains(menu, item => item.ToString().Equals(ss8.ToString())); Assert.Contains(menu, item => item.ToString().Equals(ss9.ToString())); Assert.Contains(menu, item => item.ToString().Equals(ss10.ToString())); Assert.Contains(menu, item => item.ToString().Equals(ss11.ToString())); Assert.Contains(menu, item => item.ToString().Equals(ss12.ToString())); Assert.Contains(menu, item => item.ToString().Equals(ss13.ToString())); Assert.Contains(menu, item => item.ToString().Equals(ss14.ToString())); Assert.Contains(menu, item => item.ToString().Equals(ss15.ToString())); Assert.Contains(menu, item => item.ToString().Equals(ss16.ToString())); Assert.Contains(menu, item => item.ToString().Equals(ss17.ToString())); Assert.Contains(menu, item => item.ToString().Equals(df0.ToString())); Assert.Contains(menu, item => item.ToString().Equals(df1.ToString())); Assert.Contains(menu, item => item.ToString().Equals(df2.ToString())); Assert.Contains(menu, item => item.ToString().Equals(fm0.ToString())); Assert.Contains(menu, item => item.ToString().Equals(fm1.ToString())); Assert.Contains(menu, item => item.ToString().Equals(fm2.ToString())); Assert.Contains(menu, item => item.ToString().Equals(mog0.ToString())); Assert.Contains(menu, item => item.ToString().Equals(mog1.ToString())); Assert.Contains(menu, item => item.ToString().Equals(mog2.ToString())); Assert.Contains(menu, item => item.ToString().Equals(vs0.ToString())); Assert.Contains(menu, item => item.ToString().Equals(vs1.ToString())); Assert.Contains(menu, item => item.ToString().Equals(vs2.ToString())); } }
public void ShouldHaveCorrectNameByDefault() { SailorSoda s = new SailorSoda(); Assert.Equal(s.ToString(), s.Name); }
public void ShouldHaveCorrectToStringBasedOnSizeAndFlavor(SodaFlavor flavor, Size size, string name) { drink.Size = size; drink.Flavor = flavor; Assert.Equal(name, drink.ToString()); }
public void NamePropertyGetsToString() { SailorSoda ss = new SailorSoda(); Assert.Equal(ss.ToString(), ss.Name); }