public void BrontowurstPropertyChange()
        {
            Brontowurst bw = new Brontowurst();

            Assert.PropertyChanged(bw, "Special", () => bw.HoldBun());
            Assert.PropertyChanged(bw, "Special", () => bw.HoldOnion());
            Assert.PropertyChanged(bw, "Special", () => bw.HoldPeppers());
        }
        public void BrontowurstHoldPeppers()
        {
            Brontowurst bw = new Brontowurst();

            bw.HoldPeppers();
            string[] test = { "Hold Peppers" };
            Assert.Equal(test, bw.Special);
        }
Example #3
0
        public void CheckAllNotifyPropertyChanges(string propertyName)
        {
            Brontowurst bw = new Brontowurst();

            Assert.PropertyChanged(bw, propertyName, () => bw.HoldOnion());
            Assert.PropertyChanged(bw, propertyName, () => bw.HoldPeppers());
            Assert.PropertyChanged(bw, propertyName, () => bw.HoldBun());
        }
Example #4
0
        public void SpecialShouldHoldPeppers()
        {
            Brontowurst b = new Brontowurst();

            b.HoldPeppers();
            Assert.Collection <string>(b.Special,
                                       item => { Assert.Equal("Hold Peppers", item); });
        }
        public void ShouldHaveHoldPeppersSpecial()
        {
            Brontowurst b = new Brontowurst();

            b.HoldPeppers();
            string[] special = { "Hold Peppers" };
            Assert.Equal(b.Special, special);
        }
        public void HoldingItemsShouldNotifyOfPropertyChange(string s)
        {
            Brontowurst dn = new Brontowurst();

            Assert.PropertyChanged(dn, s, () => { dn.HoldBun(); });
            Assert.PropertyChanged(dn, s, () => { dn.HoldOnion(); });
            Assert.PropertyChanged(dn, s, () => { dn.HoldPeppers(); });
        }
Example #7
0
        public void ShouldHaveCorrectSpecialHoldPeppers()
        {
            Brontowurst bw = new Brontowurst();

            bw.HoldPeppers();
            Assert.Contains("Hold Peppers", bw.Special);
            Assert.Single(bw.Special);
        }
Example #8
0
        public void SpecialShouldContainHoldPeppers()
        {
            Brontowurst bw = new Brontowurst();

            bw.HoldPeppers();
            Assert.Collection <string>(bw.Special,
                                       item => Assert.Equal("Hold Peppers", item));
        }
 private void OnHoldPeppers(object sender, RoutedEventArgs args)
 {
     bron.HoldPeppers();
     if (combo != null)
     {
         combo.Entree = bron;
     }
 }
Example #10
0
        public void HoldPeppersShouldRemovePeppers()
        {
            Brontowurst bw = new Brontowurst();

            bw.HoldPeppers();
            Assert.DoesNotContain <string>("Peppers", bw.Ingredients);
            Assert.Contains <string>("Hold Peppers", bw.Special);
        }
        public void HoldPepperShouldNotifyOfSpecialChanged()
        {
            Brontowurst pbj = new Brontowurst();

            Assert.PropertyChanged(pbj, "Special", () => {
                pbj.HoldPeppers();
            });
        }
Example #12
0
        public void AddPeppersShouldAddPeppers()
        {
            Brontowurst bw = new Brontowurst();

            bw.HoldPeppers();
            bw.AddPeppers();
            Assert.Contains("Peppers", bw.Ingredients);
        }
Example #13
0
        public void BrontowurstPrpertyChangesShouldBeCorrect()
        {
            Brontowurst b = new Brontowurst();

            Assert.PropertyChanged(b, "Special", () => b.HoldBun());
            Assert.PropertyChanged(b, "Special", () => b.HoldOnion());
            Assert.PropertyChanged(b, "Special", () => b.HoldPeppers());
        }
Example #14
0
        public void HoldingPeppersShouldNotifyIngredientsChange()
        {
            Brontowurst bw = new Brontowurst();

            Assert.PropertyChanged(bw, "Ingredients", () =>
            {
                bw.HoldPeppers();
            });
        }
Example #15
0
        public void HoldPeppersAndOnionsShouldProvideCorrectSpecial()
        {
            Brontowurst bw = new Brontowurst();

            bw.HoldPeppers();
            bw.HoldOnion();
            Assert.Contains("Hold Peppers", bw.Special);
            Assert.Contains("Hold Onions", bw.Special);
        }
Example #16
0
        public void ShouldUpdateSpecialWhenHoldPeppers()
        {
            Brontowurst bw = new Brontowurst();

            Assert.PropertyChanged(bw, "Special", () =>
            {
                bw.HoldPeppers();
            });
        }
Example #17
0
        public void HoldingPeppersShouldNotifyChange(string expected)
        {
            Brontowurst bw = new Brontowurst();

            Assert.PropertyChanged(bw, expected, () =>
            {
                bw.HoldPeppers();
            });
        }
Example #18
0
        public void SpecialShouldHoldPeppers()
        {
            Brontowurst bw = new Brontowurst();

            bw.HoldPeppers();
            string[] special = bw.Special;
            Assert.Contains <string>("Hold Peppers", special);
            Assert.Equal <int>(1, special.Length);
        }
Example #19
0
        public void BrotowurstHoldPeppersShouldNotifyPropertyChanged()
        {
            Brontowurst bronto = new Brontowurst();

            Assert.PropertyChanged(bronto, "Special", () =>
            {
                bronto.HoldPeppers();
            });
        }
Example #20
0
        public void HoldPeppersShouldNotifyOfSpecialPropertyChange()
        {
            Brontowurst bw = new Brontowurst();

            Assert.PropertyChanged(bw, "Special", () =>
            {
                bw.HoldPeppers();
            });
        }
Example #21
0
        public void HoldPeppersShouldNotifyOfPropertyChanged(string propertyName)
        {
            Brontowurst b = new Brontowurst();

            Assert.PropertyChanged(b, propertyName, () =>
            {
                b.HoldPeppers();
            });
        }
Example #22
0
        public void HoldingPeppersShouldNotifySpecialChange()
        {
            Brontowurst b = new Brontowurst();

            Assert.PropertyChanged(b, "Special", () =>
            {
                b.HoldPeppers();
            });
        }
        public void BronowurstShouldNotify()
        {
            Brontowurst b = new Brontowurst();

            Assert.PropertyChanged(b, "Special", () => b.HoldBun());

            Assert.PropertyChanged(b, "Special", () => b.HoldBun());

            Assert.PropertyChanged(b, "Special", () => b.HoldPeppers());
        }
Example #24
0
        public void ShouldHaveCorrectSpecialForHoldPeppers()
        {
            Brontowurst bw = new Brontowurst();

            bw.HoldPeppers();
            Assert.Collection <string>(bw.Special, item =>
            {
                Assert.Equal("Hold Peppers", item);
            });
        }
Example #25
0
        public void ShouldHaveAllSpecials()
        {
            Brontowurst b = new Brontowurst();

            b.HoldBun();
            b.HoldPeppers();
            b.HoldOnion();
            string[] special = { "Hold Bun", "Hold Peppers", "Hold Onion" };
            Assert.Equal(b.Special, special);
        }
 private void Click_HoldPeppers(object sender, RoutedEventArgs e)
 {
     if (sender.Equals(Button_HoldPeppers))
     {
         if (DataContext is Order order)
         {
             _brontowurst.HoldPeppers();
         }
     }
 }
Example #27
0
        public void HoldPeppersShouldAddToSpecial()
        {
            Brontowurst bw = new Brontowurst();

            bw.HoldPeppers();
            Assert.Collection <string>(bw.Special, item =>
            {
                Assert.Equal("Hold Peppers", item);
            });
        }
Example #28
0
        public void CheckPropertyChangedBrontowurst()
        {
            Brontowurst ft = new Brontowurst();

            Assert.PropertyChanged(ft, "Price", () => ft.Price *= 2);
            Assert.PropertyChanged(ft, "Bun", () => ft.HoldBun());
            Assert.PropertyChanged(ft, "Onion", () => ft.HoldOnion());
            Assert.PropertyChanged(ft, "Peppers", () => ft.HoldPeppers());
            Assert.PropertyChanged(ft, "Special", () => ft.HoldBun());
        }
        public void BrontowurstShouldGiveCorrectArrayForThreeSpecials()
        {
            Brontowurst b = new Brontowurst();

            b.HoldBun();
            b.HoldOnion();
            b.HoldPeppers();
            Assert.Contains <string>("Hold Bun", b.Special);
            Assert.Contains <string>("Hold Onion", b.Special);
            Assert.Contains <string>("Hold Peppers", b.Special);
        }
Example #30
0
 private void HoldPeppersClicked(object sender, RoutedEventArgs e)
 {
     bronto?.HoldPeppers();
     if (this.combo != null)
     {
         if (this.combo.Entree is Brontowurst sb)
         {
             sb.HoldPeppers();
         }
     }
 }