예제 #1
0
        public void SidesContainsPanDeCampo()
        {
            IOrderItem pan = new PanDeCampo();
            IEnumerable <IOrderItem> sidesList = Menu.Sides();

            Assert.Contains(pan, sidesList);
        }
예제 #2
0
        public void AllContainsPanDeCampo()
        {
            IOrderItem pan = new PanDeCampo();
            IEnumerable <IOrderItem> menuList = Menu.All();

            Assert.Contains(pan, menuList);
        }
예제 #3
0
        public void ChangingSizeShouldInvokePropertyChangedForCalories()
        {
            var pdc = new PanDeCampo();

            pdc.Size = Size.Large;
            Assert.Equal(pdc.Calories, SideInformation.LARGE_PANDECAMPO_CALORIES);
        }
        /// <summary>
        /// Adds Pan de Campo
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Pan_de_Campo(object sender, RoutedEventArgs e)
        {
            var side   = new PanDeCampo();
            var screen = new CustomizedPanDeCampo();

            AddItemAndOpenCustomizationScreen(side, screen);
        }
예제 #5
0
        public void ChangingSizeShouldInvokePropertyChangedForPrice()
        {
            var pdc = new PanDeCampo();

            pdc.Size = Size.Large;
            Assert.Equal(pdc.Price, SideInformation.LARGE_PANDECAMPO_PRICE);
        }
예제 #6
0
        public void ChangingSizeShouldInvokePropertyChangedForSize()
        {
            var pdc = new PanDeCampo();

            pdc.Size = Size.Large;
            Assert.Equal(Size.Large, pdc.Size);
        }
예제 #7
0
        /// <summary>
        /// Listener for the click event of the Pan de Campo Button
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void OnAddPanDeCampoButton_Clicked(object sender, RoutedEventArgs e)
        {
            PanDeCampo p      = new PanDeCampo();
            var        screen = new CustomizePanDeCampo();

            AddItemAndOpenCustomizationScreen(p, screen);
        }
예제 #8
0
        public void ChangingSizePropertyShouldInvokePropertyChangedForCalories()
        {
            var pan = new PanDeCampo();

            Assert.PropertyChanged(pan, "Calories", () => {
                pan.Size = Size.Medium;
            });
        }
        public void ChangingSizeToLargeInvokesPropertyChangedForSize()
        {
            var campo = new PanDeCampo();

            Assert.PropertyChanged(campo, "Size", () =>
                                   campo.Size = Size.Large
                                   );
        }
예제 #10
0
        public void ChaningSizePropertyshouldNotifyCalories()
        {
            var panDeCampo = new PanDeCampo();

            Assert.PropertyChanged(panDeCampo, "Calories", () => {
                panDeCampo.Size = Size.Large;
            });
        }
예제 #11
0
        public void ChangingSizePropertyShouldInvokePropertyChangedForSize()
        {
            var c = new PanDeCampo();

            Assert.PropertyChanged(c, "Size", () => {
                c.Size = Size.Medium;
            });
        }
예제 #12
0
        public void ShouldUseCorrectPriceForSize(Size size, double price)
        {
            PanDeCampo pdc = new PanDeCampo();

            pdc.Size = Size.Medium;
            pdc.Size = size;
            Assert.Equal(price, pdc.Price);
        }
예제 #13
0
        public void PanDeCampoShouldImplementINotifyPropertyChanged()
        {
            var   pdc      = new PanDeCampo();
            Order newOrder = new Order(1);

            newOrder.Add(pdc);
            Assert.IsAssignableFrom <INotifyPropertyChanged>(newOrder);
        }
예제 #14
0
        public void ChangingSizePropertyShouldInvokePropertyChangedForPrice()
        {
            var panDeCampo = new PanDeCampo();

            Assert.PropertyChanged(panDeCampo, "Price", () => {
                panDeCampo.Size = Size.Medium;
            });
        }
        public void ChangingSizePropertyShouldInvokeProperyChangedForCalories()
        {
            var panDeCampo = new PanDeCampo();

            Assert.PropertyChanged(panDeCampo, "Calories", () => {
                panDeCampo.Size = Size.Large;
            });
        }
예제 #16
0
        public void ChangingSizePropertyShouldInvokePropertyChangedForPrice()
        {
            var pan = new PanDeCampo();

            Assert.PropertyChanged(pan, "Price", () => {
                pan.Size = Size.Large;
            });
        }
예제 #17
0
        public void ShouldUseCorrectCaloriesForSize(Size size, uint calories)
        {
            PanDeCampo pdc = new PanDeCampo();

            pdc.Size = Size.Medium;
            pdc.Size = size;
            Assert.Equal <uint>(calories, pdc.Calories);
        }
예제 #18
0
        public void ShouldReturnAllSides()
        {
            var result = new List <IOrderItem>();

            CornDodgers dodgersSmall = new CornDodgers();

            dodgersSmall.Size = Size.Small;
            result.Add(dodgersSmall);
            CornDodgers dodgersMedium = new CornDodgers();

            dodgersMedium.Size = Size.Medium;
            result.Add(dodgersMedium);
            CornDodgers dodgersLarge = new CornDodgers();

            dodgersLarge.Size = Size.Large;
            result.Add(dodgersLarge);

            ChiliCheeseFries chiliSmall = new ChiliCheeseFries();

            chiliSmall.Size = Size.Small;
            result.Add(chiliSmall);
            ChiliCheeseFries chiliMedium = new ChiliCheeseFries();

            chiliMedium.Size = Size.Medium;
            result.Add(chiliMedium);
            ChiliCheeseFries chiliLarge = new ChiliCheeseFries();

            chiliLarge.Size = Size.Large;
            result.Add(chiliLarge);

            BakedBeans bakedSmall = new BakedBeans();

            bakedSmall.Size = Size.Small;
            result.Add(bakedSmall);
            BakedBeans bakedMedium = new BakedBeans();

            bakedMedium.Size = Size.Medium;
            result.Add(bakedMedium);
            BakedBeans bakedLarge = new BakedBeans();

            bakedLarge.Size = Size.Large;
            result.Add(bakedLarge);

            PanDeCampo campoSmall = new PanDeCampo();

            campoSmall.Size = Size.Small;
            result.Add(campoSmall);
            PanDeCampo campoMedium = new PanDeCampo();

            campoMedium.Size = Size.Medium;
            result.Add(campoMedium);
            PanDeCampo campoLarge = new PanDeCampo();

            campoLarge.Size = Size.Large;
            result.Add(campoLarge);

            Assert.Equal(result.Count(), Menu.Sides().Count());
        }
예제 #19
0
        public void ChangingSizeShouldInvokePropertyChangedForSpecialInstructions()
        {
            var side = new PanDeCampo();

            Assert.PropertyChanged(side, "SpecialInstructions", () =>
            {
                side.Size = Size.Medium;
            });
        }
        public void PanDeCampoSizeChangeShouldChangeTheCalories()
        {
            var item = new PanDeCampo();

            Assert.PropertyChanged(item, "Calories", () =>
            {
                item.Size = Size.Medium;
            });
        }
        public void ChangingSizeShouldInvokePropertyChangedForToString()
        {
            var item = new PanDeCampo();

            Assert.PropertyChanged(item, "ToString", () =>
            {
                item.Size = Size.Large;
            });
        }
        public void ChangingSizeShouldInvokePropertyChangeForSize()
        {
            var decampo = new PanDeCampo();

            Assert.PropertyChanged(decampo, "Size", () =>
            {
                decampo.Size = Size.Large;
            });
        }
예제 #23
0
        public void PanDeCampoSizeChangeShouldNotifyPropertyChangedForCalories(Size size)
        {
            PanDeCampo pan = new PanDeCampo();

            Assert.PropertyChanged(pan, "Calories", () =>
            {
                pan.Size = size;
            });
        }
예제 #24
0
        public void PanDeCampoFriesSizeChangeShouldNotifyPropertyChanged(Size size)
        {
            PanDeCampo pan = new PanDeCampo();

            Assert.PropertyChanged(pan, "Size", () =>
            {
                pan.Size = size;
            });
        }
        public void ChangingSizeShouldInvokePropertyChangedForSpecialInstructions()
        {
            var pan = new PanDeCampo();

            Assert.PropertyChanged(pan, "SpecialInstructions", () =>
            {
                pan.Size = Size.Large;
            });
        }
        public void ChangingSizeToMediumShouldInvokePropertyChangedForCalories()
        {
            var campo = new PanDeCampo();

            Assert.PropertyChanged(campo, "Calories", () =>
            {
                campo.Size = Size.Medium;
            });
        }
        public void ChangingSizeToLargeShouldInvokePropertyChangedForPrice()
        {
            var campo = new PanDeCampo();

            Assert.PropertyChanged(campo, "Price", () =>
            {
                campo.Size = Size.Large;
            });
        }
        public void ChangingSizeShouldInvokeINotifyPropertyChangedForCalories(Size size)
        {
            var panDeCampo = new PanDeCampo();

            Assert.PropertyChanged(panDeCampo, "Calories", () =>
            {
                panDeCampo.Size = size;
            });
        }
예제 #29
0
        public void ChangingSizeShouldInvokePropertyChangedForSize()
        {
            var pan = new PanDeCampo();

            Assert.PropertyChanged(pan, "Size", () =>
            {
                pan.Size = Size.Medium;
            });
        }
예제 #30
0
        public void ChangingSizeShouldInvokePropertyChangedForSize()
        {
            var side = new PanDeCampo();

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