Example #1
0
        public void ShouldBeAbleToSetIce()
        {
            var AAJ = new ArentinoAppleJuice();

            AAJ.Ice = true;
            Assert.True(AAJ.Ice);
        }
Example #2
0
        public void ShouldBeAbleToSetSize()
        {
            var AAJ = new ArentinoAppleJuice();

            AAJ.Size = Size.Medium;
            Assert.True(AAJ.Size == Size.Medium);
        }
Example #3
0
        public void ShouldHaveCorrectCaloriesForSize(Size size, uint cal)
        {
            ArentinoAppleJuice aj = new ArentinoAppleJuice();

            aj.Size = size;
            Assert.Equal(cal, aj.Calories);
        }
Example #4
0
        public void ShouldHaveCorrectPriceForSize(Size size, double price)
        {
            ArentinoAppleJuice aj = new ArentinoAppleJuice();

            aj.Size = size;
            Assert.Equal(price, aj.Price);
        }
Example #5
0
        public void ShouldReturnCorrectToStringBasedOnSize(Size size, string name)
        {
            ArentinoAppleJuice aj = new ArentinoAppleJuice();

            aj.Size = size;
            Assert.Equal(name, aj.ToString());
        }
Example #6
0
        public void ShouldHaveCorrectPriceForSize(Size size, double price)
        {
            var AAJ = new ArentinoAppleJuice()
            {
                Size = size
            };

            Assert.Equal(price, AAJ.Price);
        }
Example #7
0
        public void ShouldBeAbleToSetIce()
        {
            ArentinoAppleJuice aj = new ArentinoAppleJuice();

            aj.Ice = true;
            Assert.True(aj.Ice);
            aj.Ice = false;
            Assert.False(aj.Ice);
        }
Example #8
0
        public void ShouldReturnCorrectToStringBasedOnSize(Size size, string name)
        {
            var AAJ = new ArentinoAppleJuice()
            {
                Size = size
            };

            Assert.Equal(AAJ.ToString(), name);
        }
Example #9
0
        public void ShouldHaveCorrectCaloriesForSize(Size size, uint cal)
        {
            var AAJ = new ArentinoAppleJuice()
            {
                Size = size
            };

            Assert.Equal(cal, AAJ.Calories);
        }
Example #10
0
        public void ShouldBeAbleToSetSize()
        {
            ArentinoAppleJuice aj = new ArentinoAppleJuice();

            aj.Size = Size.Large;
            Assert.Equal(Size.Large, aj.Size);
            aj.Size = Size.Medium;
            Assert.Equal(Size.Medium, aj.Size);
            aj.Size = Size.Small;
            Assert.Equal(Size.Small, aj.Size);
        }
Example #13
0
        // A click event handler for the Arentino Apple Juice button
        void AddArentinoAppleJuice(object sender, RoutedEventArgs e)
        {
            var screen = new ArentinoAppleJuiceCustom();
            ArentinoAppleJuice temp = new ArentinoAppleJuice();

            comboBorder.Child  = screen;
            screen.DataContext = temp;
            if (DataContext is Combo combo)
            {
                combo.Drink  = temp;
                screen.Combo = combo;
            }
        }
Example #14
0
        public void ShouldHaveCorrectSpecialInstructions(bool includeIce)
        {
            ArentinoAppleJuice aj = new ArentinoAppleJuice();

            aj.Ice = includeIce;
            if (includeIce)
            {
                Assert.Contains("Add ice", aj.SpecialInstructions);
            }
            else
            {
                Assert.Empty(aj.SpecialInstructions);
            }
        }
Example #15
0
        public void ShouldHaveCorrectSpecialInstructions(bool includeIce)
        {
            var AAJ = new ArentinoAppleJuice()
            {
                Ice = includeIce
            };

            if (includeIce)
            {
                Assert.Contains("Add ice", AAJ.SpecialInstructions);
            }
            if (!includeIce)
            {
                Assert.Empty(AAJ.SpecialInstructions);
            }
        }
Example #17
0
        public void ChangingSizeNotifiesSizeProperty()
        {
            var AJ = new ArentinoAppleJuice();

            Assert.PropertyChanged(AJ, "Size", () =>
            {
                AJ.Size = Size.Large;
            });

            Assert.PropertyChanged(AJ, "Size", () =>
            {
                AJ.Size = Size.Medium;
            });
            Assert.PropertyChanged(AJ, "Size", () =>
            {
                AJ.Size = Size.Small;
            });
        }
Example #18
0
        public void ChangingSizeNotifiesCaloriesProperty()
        {
            ArentinoAppleJuice aj = new ArentinoAppleJuice();

            Assert.PropertyChanged(aj, "Calories", () =>
            {
                aj.Size = Size.Large;
            });

            Assert.PropertyChanged(aj, "Calories", () =>
            {
                aj.Size = Size.Medium;
            });

            Assert.PropertyChanged(aj, "Calories", () =>
            {
                aj.Size = Size.Large;
            });
        }
Example #19
0
        public void ShouldNotIncludeIceByDefault()
        {
            ArentinoAppleJuice aj = new ArentinoAppleJuice();

            Assert.False(aj.Ice);
        }
Example #20
0
        public void ShouldBeADrink()
        {
            ArentinoAppleJuice aj = new ArentinoAppleJuice();

            Assert.IsAssignableFrom <Drink>(aj);
        }
Example #21
0
        public void ShouldBeIOrderItem()
        {
            ArentinoAppleJuice aj = new ArentinoAppleJuice();

            Assert.IsAssignableFrom <IOrderItem>(aj);
        }
Example #22
0
        public void IsAssignableFromINotifyPropertyChanged()
        {
            ArentinoAppleJuice aj = new ArentinoAppleJuice();

            Assert.IsAssignableFrom <INotifyPropertyChanged>(aj);
        }
Example #23
0
        public void ShouldReturnCorrectDescription()
        {
            ArentinoAppleJuice aj = new ArentinoAppleJuice();

            Assert.Equal("Fresh squeezed apple juice.", aj.Description);
        }
Example #25
0
        public void ShouldBeAssignableToAbstractDrinkClass()
        {
            var AAJ = new ArentinoAppleJuice();

            Assert.IsAssignableFrom <Drink>(AAJ);
        }
Example #26
0
        public void ShouldBeAssignableToIOrderItem()
        {
            var AAJ = new ArentinoAppleJuice();

            Assert.IsAssignableFrom <IOrderItem>(AAJ);
        }
Example #27
0
        public void ShouldNotIncludeIceByDefault()
        {
            var AAJ = new ArentinoAppleJuice();

            Assert.False(AAJ.Ice);
        }
Example #28
0
        public void ShouldBeSmallByDefault()
        {
            var AAJ = new ArentinoAppleJuice();

            Assert.True(AAJ.Size == Size.Small);
        }
Example #29
0
        public void ShouldBeSmallByDefault()
        {
            ArentinoAppleJuice aj = new ArentinoAppleJuice();

            Assert.Equal(Size.Small, aj.Size);
        }
Example #30
0
        /// <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);
        }