コード例 #1
0
        public void ShouldBeASide()
        {
            var fm = new FriedMiraak();

            Assert.IsAssignableFrom <Side>(fm);
        }
コード例 #2
0
        public void ShouldBeSmallByDefault()
        {
            FriedMiraak fm = new FriedMiraak();

            Assert.Equal(Size.Small, fm.Size);
        }
コード例 #3
0
 /// <summary>
 /// initializes customization WPF
 /// </summary>
 public FriedMiraakCustom()
 {
     InitializeComponent();
     Side             = new FriedMiraak();
     this.DataContext = Side;
 }
コード例 #4
0
        public void ShouldBeASide()
        {
            FriedMiraak dbwf = new FriedMiraak();

            Assert.IsAssignableFrom <Side>(dbwf);
        }
コード例 #5
0
        public void ShouldBeAnItem()
        {
            FriedMiraak fm = new FriedMiraak();

            Assert.IsAssignableFrom <IOrderItem>(fm);
        }
コード例 #6
0
        public void ShouldImplementINotifyProperty()
        {
            FriedMiraak fm = new FriedMiraak();

            Assert.IsAssignableFrom <INotifyPropertyChanged>(fm);
        }
コード例 #7
0
        public void ShouldBeAssignToIORderItem()
        {
            FriedMiraak a = new FriedMiraak();

            Assert.IsAssignableFrom <IOrderItem>(a);
        }
コード例 #8
0
        public static IEnumerable <IOrderItem> FullMenu()
        {
            var BB  = new BriarheartBurger();
            var DD  = new DoubleDraugr();
            var GOO = new GardenOrcOmelette();
            var PP  = new PhillyPoacher();
            var SS  = new SmokehouseSkeleton();
            var TT  = new ThalmorTriple();
            var TTB = new ThugsTBone();
            var sD  = new DragonbornWaffleFries();
            var mD  = new DragonbornWaffleFries();

            mD.Size = Size.Medium;
            var lD = new DragonbornWaffleFries();

            lD.Size = Size.Large;
            var sF = new FriedMiraak();
            var mF = new FriedMiraak();

            mF.Size = Size.Medium;
            var lF = new FriedMiraak();

            lF.Size = Size.Large;
            var sM = new MadOtarGrits();
            var mM = new MadOtarGrits();

            mM.Size = Size.Medium;
            var lM = new MadOtarGrits();

            lM.Size = Size.Large;
            var sV = new VokunSalad();
            var mV = new VokunSalad();

            mV.Size = Size.Medium;
            var lV = new VokunSalad();

            lV.Size = Size.Large;
            var sA = new ArentinoAppleJuice();
            var mA = new ArentinoAppleJuice();

            mA.Size = Size.Medium;
            var lA = new ArentinoAppleJuice();

            lA.Size = Size.Large;
            var sC = new CandlehearthCoffee();
            var mC = new CandlehearthCoffee();

            mC.Size = Size.Medium;
            var lC = new CandlehearthCoffee();

            lC.Size = Size.Large;
            var sMM = new MarkarthMilk();
            var mMM = new MarkarthMilk();

            mMM.Size = Size.Medium;
            var lMM = new MarkarthMilk();

            lMM.Size = Size.Large;
            var sW = new WarriorWater();
            var mW = new WarriorWater();

            mW.Size = Size.Medium;
            var lW = new WarriorWater();

            lW.Size = Size.Large;
            var scS = new SailorSoda();

            scS.Flavor = SodaFlavor.Cherry;
            var mcS = new SailorSoda();

            mcS.Size   = Size.Medium;
            mcS.Flavor = SodaFlavor.Cherry;
            var lcS = new SailorSoda();

            lcS.Size   = Size.Large;
            lcS.Flavor = SodaFlavor.Cherry;
            var sbS = new SailorSoda
            {
                Flavor = SodaFlavor.Blackberry
            };
            var mbS = new SailorSoda
            {
                Flavor = SodaFlavor.Blackberry,
                Size   = Size.Medium
            };

            var lbS = new SailorSoda
            {
                Flavor = SodaFlavor.Blackberry,
                Size   = Size.Large
            };
            var spS = new SailorSoda
            {
                Flavor = SodaFlavor.Peach
            };
            var mpS = new SailorSoda
            {
                Flavor = SodaFlavor.Peach,
                Size   = Size.Medium
            };
            var lpS = new SailorSoda
            {
                Flavor = SodaFlavor.Peach,
                Size   = Size.Large
            };
            var slS = new SailorSoda
            {
                Flavor = SodaFlavor.Lemon
            };
            var mlS = new SailorSoda
            {
                Flavor = SodaFlavor.Lemon,
                Size   = Size.Medium
            };
            var llS = new SailorSoda
            {
                Flavor = SodaFlavor.Lemon,
                Size   = Size.Large
            };
            var sgS = new SailorSoda
            {
                Flavor = SodaFlavor.Grapefruit
            };
            var mgS = new SailorSoda
            {
                Flavor = SodaFlavor.Grapefruit,
                Size   = Size.Medium
            };
            var lgS = new SailorSoda
            {
                Flavor = SodaFlavor.Grapefruit,
                Size   = Size.Large
            };
            var swS = new SailorSoda
            {
                Flavor = SodaFlavor.Watermelon
            };
            var mwS = new SailorSoda
            {
                Flavor = SodaFlavor.Watermelon,
                Size   = Size.Medium
            };
            var lwS = new SailorSoda
            {
                Flavor = SodaFlavor.Watermelon,
                Size   = Size.Large
            };

            IOrderItem[]             result     = { BB, DD, GOO, PP, SS, TT, TTB, sD, mD, lD, sF, mF, lF, sM, mM, lM, sV, mV, lV, sA, mA, lA, sC, mC, lC, sMM, mMM, lMM, sW, mW, lW, scS, mcS, lcS, sbS, mbS, lbS, spS, mpS, lpS, slS, mlS, llS, sgS, mgS, lgS, swS, mwS, lwS };
            IEnumerable <IOrderItem> enumerator = new List <IOrderItem>(result);

            return(enumerator);
        }
コード例 #9
0
        public void ShouldBeASide()
        {
            FriedMiraak mir = new FriedMiraak();

            Assert.IsAssignableFrom <Side>(mir);
        }
コード例 #10
0
        public void ShouldBeADrink()
        {
            FriedMiraak fm = new FriedMiraak();

            Assert.IsAssignableFrom <Side>(fm);
        }
コード例 #11
0
        public void ShouldBeAssignableToAbstractSideClass()
        {
            FriedMiraak f = new FriedMiraak();

            Assert.IsAssignableFrom <Side>(f);
        }
コード例 #12
0
        public void ImplementsINotifyPropertyChangedInterface()
        {
            var fm = new FriedMiraak();

            Assert.IsAssignableFrom <INotifyPropertyChanged>(fm);
        }
コード例 #13
0
        public void ShouldHaveCorrectBaseName()
        {
            var fm = new FriedMiraak();

            Assert.Equal("Fried Miraak", fm.BaseName);
        }
コード例 #14
0
        public void ShouldImplementIOrderItem()
        {
            var fm = new FriedMiraak();

            Assert.IsAssignableFrom <IOrderItem>(fm);
        }
コード例 #15
0
        public void SideListContainsAllSides()
        {
            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> sideList = (List <IOrderItem>)Menu.Sides();

            foreach (IOrderItem item in sideList)
            {
                Assert.Contains(sideList, item => item.ToString().Equals(df0.ToString()));
                Assert.Contains(sideList, item => item.ToString().Equals(df1.ToString()));
                Assert.Contains(sideList, item => item.ToString().Equals(df2.ToString()));
                Assert.Contains(sideList, item => item.ToString().Equals(fm0.ToString()));
                Assert.Contains(sideList, item => item.ToString().Equals(fm1.ToString()));
                Assert.Contains(sideList, item => item.ToString().Equals(fm2.ToString()));
                Assert.Contains(sideList, item => item.ToString().Equals(mog0.ToString()));
                Assert.Contains(sideList, item => item.ToString().Equals(mog1.ToString()));
                Assert.Contains(sideList, item => item.ToString().Equals(mog2.ToString()));
                Assert.Contains(sideList, item => item.ToString().Equals(vs0.ToString()));
                Assert.Contains(sideList, item => item.ToString().Equals(vs1.ToString()));
                Assert.Contains(sideList, item => item.ToString().Equals(vs2.ToString()));
            }
        }
コード例 #16
0
        public void ShouldImplementIOrderItem()
        {
            FriedMiraak mir = new FriedMiraak();

            Assert.IsAssignableFrom <IOrderItem>(mir);
        }
コード例 #17
0
        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()));
            }
        }
コード例 #18
0
ファイル: Menu.cs プロジェクト: mawittma/bleakwind-buffet
        /// <summary>
        /// represents every item on the menu
        /// </summary>
        /// <returns>yield returns every item on the menu</returns>
        public static IEnumerable <IOrderItem> FullMenu()
        {
            yield return(new BriarheartBurger());

            yield return(new DoubleDraugr());

            yield return(new GardenOrcOmelette());

            yield return(new PhillyPoacher());

            yield return(new SmokehouseSkeleton());

            yield return(new ThalmorTriple());

            yield return(new ThugsTBone());

            DragonbornWaffleFries dwf1 = new DragonbornWaffleFries();
            DragonbornWaffleFries dwf2 = new DragonbornWaffleFries();
            DragonbornWaffleFries dwf3 = new DragonbornWaffleFries();

            dwf1.Size = Enums.Size.Small;
            dwf2.Size = Enums.Size.Medium;
            dwf3.Size = Enums.Size.Large;
            yield return(dwf1);

            yield return(dwf2);

            yield return(dwf3);

            FriedMiraak fm1 = new FriedMiraak();
            FriedMiraak fm2 = new FriedMiraak();
            FriedMiraak fm3 = new FriedMiraak();

            fm1.Size = Enums.Size.Small;
            fm2.Size = Enums.Size.Medium;
            fm3.Size = Enums.Size.Large;
            yield return(fm1);

            yield return(fm2);

            yield return(fm3);

            MadOtarGrits mog1 = new MadOtarGrits();
            MadOtarGrits mog2 = new MadOtarGrits();
            MadOtarGrits mog3 = new MadOtarGrits();

            mog1.Size = Enums.Size.Small;
            mog2.Size = Enums.Size.Medium;
            mog3.Size = Enums.Size.Large;
            yield return(mog1);

            yield return(mog2);

            yield return(mog3);

            VokunSalad vs1 = new VokunSalad();
            VokunSalad vs2 = new VokunSalad();
            VokunSalad vs3 = new VokunSalad();

            vs1.Size = Enums.Size.Small;
            vs2.Size = Enums.Size.Medium;
            vs3.Size = Enums.Size.Large;
            yield return(vs1);

            yield return(vs2);

            yield return(vs3);

            ArentinoAppleJuice aj1 = new ArentinoAppleJuice();
            ArentinoAppleJuice aj2 = new ArentinoAppleJuice();
            ArentinoAppleJuice aj3 = new ArentinoAppleJuice();

            aj1.Size = Enums.Size.Small;
            aj2.Size = Enums.Size.Medium;
            aj3.Size = Enums.Size.Large;
            yield return(aj1);

            yield return(aj2);

            yield return(aj3);

            CandlehearthCoffee cc1 = new CandlehearthCoffee();
            CandlehearthCoffee cc2 = new CandlehearthCoffee();
            CandlehearthCoffee cc3 = new CandlehearthCoffee();

            cc1.Size = Enums.Size.Small;
            cc2.Size = Enums.Size.Medium;
            cc3.Size = Enums.Size.Large;
            yield return(cc1);

            yield return(cc2);

            yield return(cc3);

            MarkarthMilk mm1 = new MarkarthMilk();
            MarkarthMilk mm2 = new MarkarthMilk();
            MarkarthMilk mm3 = new MarkarthMilk();

            mm1.Size = Enums.Size.Small;
            mm2.Size = Enums.Size.Medium;
            mm3.Size = Enums.Size.Large;
            yield return(mm1);

            yield return(mm2);

            yield return(mm3);

            WarriorWater ww1 = new WarriorWater();
            WarriorWater ww2 = new WarriorWater();
            WarriorWater ww3 = new WarriorWater();

            ww1.Size = Enums.Size.Small;
            ww2.Size = Enums.Size.Medium;
            ww3.Size = Enums.Size.Large;
            yield return(ww1);

            yield return(ww2);

            yield return(ww3);

            SailorSoda ssb1 = new SailorSoda();
            SailorSoda ssb2 = new SailorSoda();
            SailorSoda ssb3 = new SailorSoda();

            ssb1.Size   = Enums.Size.Small;
            ssb2.Size   = Enums.Size.Medium;
            ssb3.Size   = Enums.Size.Large;
            ssb1.Flavor = Enums.SodaFlavor.Blackberry;
            ssb2.Flavor = Enums.SodaFlavor.Blackberry;
            ssb3.Flavor = Enums.SodaFlavor.Blackberry;
            yield return(ssb1);

            yield return(ssb2);

            yield return(ssb3);

            SailorSoda ssc1 = new SailorSoda();
            SailorSoda ssc2 = new SailorSoda();
            SailorSoda ssc3 = new SailorSoda();

            ssc1.Size   = Enums.Size.Small;
            ssc2.Size   = Enums.Size.Medium;
            ssc3.Size   = Enums.Size.Large;
            ssc1.Flavor = Enums.SodaFlavor.Cherry;
            ssc2.Flavor = Enums.SodaFlavor.Cherry;
            ssc3.Flavor = Enums.SodaFlavor.Cherry;
            yield return(ssc1);

            yield return(ssc2);

            yield return(ssc3);

            SailorSoda ssg1 = new SailorSoda();
            SailorSoda ssg2 = new SailorSoda();
            SailorSoda ssg3 = new SailorSoda();

            ssg1.Size   = Enums.Size.Small;
            ssg2.Size   = Enums.Size.Medium;
            ssg3.Size   = Enums.Size.Large;
            ssg1.Flavor = Enums.SodaFlavor.Grapefruit;
            ssg2.Flavor = Enums.SodaFlavor.Grapefruit;
            ssg3.Flavor = Enums.SodaFlavor.Grapefruit;
            yield return(ssg1);

            yield return(ssg2);

            yield return(ssg3);

            SailorSoda ssl1 = new SailorSoda();
            SailorSoda ssl2 = new SailorSoda();
            SailorSoda ssl3 = new SailorSoda();

            ssl1.Size   = Enums.Size.Small;
            ssl2.Size   = Enums.Size.Medium;
            ssl3.Size   = Enums.Size.Large;
            ssl1.Flavor = Enums.SodaFlavor.Lemon;
            ssl2.Flavor = Enums.SodaFlavor.Lemon;
            ssl3.Flavor = Enums.SodaFlavor.Lemon;
            yield return(ssl1);

            yield return(ssl2);

            yield return(ssl3);

            SailorSoda ssp1 = new SailorSoda();
            SailorSoda ssp2 = new SailorSoda();
            SailorSoda ssp3 = new SailorSoda();

            ssp1.Size   = Enums.Size.Small;
            ssp2.Size   = Enums.Size.Medium;
            ssp3.Size   = Enums.Size.Large;
            ssp1.Flavor = Enums.SodaFlavor.Peach;
            ssp2.Flavor = Enums.SodaFlavor.Peach;
            ssp3.Flavor = Enums.SodaFlavor.Peach;
            yield return(ssp1);

            yield return(ssp2);

            yield return(ssp3);

            SailorSoda ssw1 = new SailorSoda();
            SailorSoda ssw2 = new SailorSoda();
            SailorSoda ssw3 = new SailorSoda();

            ssw1.Size   = Enums.Size.Small;
            ssw2.Size   = Enums.Size.Medium;
            ssw3.Size   = Enums.Size.Large;
            ssw1.Flavor = Enums.SodaFlavor.Watermelon;
            ssw2.Flavor = Enums.SodaFlavor.Watermelon;
            ssw3.Flavor = Enums.SodaFlavor.Watermelon;
            yield return(ssw1);

            yield return(ssw2);

            yield return(ssw3);
        }
コード例 #19
0
ファイル: Menu.cs プロジェクト: jrwills/bleakwind-buffet
        public static IEnumerable <IOrderItem> Sides()
        {
            List <IOrderItem>     sides = new List <IOrderItem>();
            DragonbornWaffleFries wf    = new DragonbornWaffleFries();
            FriedMiraak           fm    = new FriedMiraak();
            MadOtarGrits          mg    = new MadOtarGrits();
            VokunSalad            vs    = new VokunSalad();

            DragonbornWaffleFries wf1 = new DragonbornWaffleFries();
            FriedMiraak           fm1 = new FriedMiraak();
            MadOtarGrits          mg1 = new MadOtarGrits();
            VokunSalad            vs1 = new VokunSalad();

            DragonbornWaffleFries wf2 = new DragonbornWaffleFries();
            FriedMiraak           fm2 = new FriedMiraak();
            MadOtarGrits          mg2 = new MadOtarGrits();
            VokunSalad            vs2 = new VokunSalad();

            bool valid = true;

            while (valid)
            {
                Size s = Size.Small;
                if (s == Size.Small)
                {
                    wf.Size = s;
                    fm.Size = s;
                    mg.Size = s;
                    vs.Size = s;
                    sides.Add((IOrderItem)wf);
                    sides.Add((IOrderItem)fm);
                    sides.Add((IOrderItem)mg);
                    sides.Add((IOrderItem)vs);
                }
                s = Size.Medium;
                if (s == Size.Medium)
                {
                    wf1.Size = s;
                    fm1.Size = s;
                    mg1.Size = s;
                    vs1.Size = s;
                    sides.Add((IOrderItem)wf1);
                    sides.Add((IOrderItem)fm1);
                    sides.Add((IOrderItem)mg1);
                    sides.Add((IOrderItem)vs1);
                }
                s = Size.Large;
                if (s == Size.Large)
                {
                    wf2.Size = s;
                    fm2.Size = s;
                    mg2.Size = s;
                    vs2.Size = s;
                    sides.Add((IOrderItem)wf2);
                    sides.Add((IOrderItem)fm2);
                    sides.Add((IOrderItem)mg2);
                    sides.Add((IOrderItem)vs2);
                }
                valid = false;
            }
            return(sides);
        }
コード例 #20
0
        public void ShouldHaveCorrectDisplayName()
        {
            var x = new FriedMiraak();

            Assert.Equal("Fried Miraak", x.DisplayName);
        }
コード例 #21
0
        public void ShouldHaveCorrectDescription()
        {
            FriedMiraak x = new FriedMiraak();

            Assert.Equal("Perfectly prepared hash brown pancakes.", x.Description);
        }
コード例 #22
0
        public void ShouldBeAssignableToIOrderItemInterface()
        {
            var x = new FriedMiraak();

            Assert.IsAssignableFrom <IOrderItem>(x);
        }
コード例 #23
0
        public void ShouldReturnCorrectDescription()
        {
            FriedMiraak fm = new FriedMiraak();

            Assert.Equal("Perfectly prepared hash brown pancakes.", fm.Description);
        }
コード例 #24
0
        public void ShouldBeAssignableToBaseSide()
        {
            var x = new FriedMiraak();

            Assert.IsAssignableFrom <Side>(x);
        }
コード例 #25
0
        public void ShouldReturnCorrectDescription(string description)
        {
            FriedMiraak fm = new FriedMiraak();

            Assert.Equal(description, fm.Description);
        }
コード例 #26
0
        public void ShouldBeAssignableToAbstractDrinkClass()
        {
            var x = new FriedMiraak();

            Assert.IsAssignableFrom <Side>(x);
        }
コード例 #27
0
        public void ShouldReturnCorrectSpecialInstructions()
        {
            FriedMiraak fm = new FriedMiraak();

            Assert.Empty(fm.SpecialInstructions);
        }
コード例 #28
0
        public void ShouldBeSmallByDefault()
        {
            var x = new FriedMiraak();

            Assert.Equal(Size.Small, x.Size);
        }
コード例 #29
0
        public void ShouldBeASide()
        {
            FriedMiraak side = new FriedMiraak();

            Assert.IsAssignableFrom <Side>(side);
        }
コード例 #30
0
        public void ItemDescriptionShouldBeCorrect()
        {
            FriedMiraak placeholder = new FriedMiraak();

            Assert.Equal("Perfectly prepared hash brown pancakes.", placeholder.Description);
        }