コード例 #1
0
ファイル: BrontowurstTest.cs プロジェクト: awbooze/dino-diner
        public void HoldBunAddsHoldBunToSpecial()
        {
            Brontowurst entree = new Brontowurst();

            entree.HoldBun();
            Assert.Equal("Hold Bun", entree.Special[0]);
        }
コード例 #2
0
        public void HoldBunShouldRemoveBun()
        {
            Brontowurst bw = new Brontowurst();

            bw.HoldBun();
            Assert.DoesNotContain <string>("Whole Wheat Bun", bw.Ingredients);
        }
コード例 #3
0
        public void SpecialShouldHoldBun()
        {
            Brontowurst bw = new Brontowurst();

            bw.HoldBun();
            Assert.Collection <string>(bw.Special, item => { Assert.Equal("Hold Bun", item); });
        }
コード例 #4
0
        public void HoldBunShouldProvideCorrectSpecial()
        {
            Brontowurst bw = new Brontowurst();

            bw.HoldBun();
            Assert.Contains("Hold Bun", bw.Special);
        }
コード例 #5
0
ファイル: BrontowurstTest.cs プロジェクト: kdmoss/dino-diner
        public void ShouldHaveCorrectSpecialAfterHoldingBun()
        {
            Brontowurst bw = new Brontowurst();

            bw.HoldBun();
            Assert.Contains <string>("Hold Bun", bw.Special);
        }
コード例 #6
0
        public void BrontowurstHoldBun()
        {
            Brontowurst bw = new Brontowurst();

            bw.HoldBun();
            string[] test = { "Hold Bun" };
            Assert.Equal(test, bw.Special);
        }
コード例 #7
0
        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(); });
        }
コード例 #8
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());
        }
コード例 #9
0
        public void ShouldHaveCorrectSpecialHoldBun()
        {
            Brontowurst bw = new Brontowurst();

            bw.HoldBun();
            Assert.Contains("Hold Bun", bw.Special);
            Assert.Single(bw.Special);
        }
コード例 #10
0
 private void OnHoldBun(object sender, RoutedEventArgs args)
 {
     bron.HoldBun();
     if (combo != null)
     {
         combo.Entree = bron;
     }
 }
コード例 #11
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());
        }
コード例 #12
0
        public void AddBunShouldAddBun()
        {
            Brontowurst bw = new Brontowurst();

            bw.HoldBun();
            bw.AddBun();
            Assert.Contains("Whole Wheat Bun", bw.Ingredients);
        }
コード例 #13
0
        public void ShouldHaveHoldBunSpecial()
        {
            Brontowurst b = new Brontowurst();

            b.HoldBun();
            string[] special = { "Hold Bun" };
            Assert.Equal(b.Special, special);
        }
コード例 #14
0
        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());
        }
コード例 #15
0
        public void ShouldUpdateSpecialWhenHoldBun()
        {
            Brontowurst bw = new Brontowurst();

            Assert.PropertyChanged(bw, "Special", () =>
            {
                bw.HoldBun();
            });
        }
コード例 #16
0
        public void HoldingBunShouldNotifyChange(string expected)
        {
            Brontowurst bw = new Brontowurst();

            Assert.PropertyChanged(bw, expected, () =>
            {
                bw.HoldBun();
            });
        }
コード例 #17
0
        public void BrotowurstHoldBunShouldNotifyPropertyChanged()
        {
            Brontowurst bronto = new Brontowurst();

            Assert.PropertyChanged(bronto, "Special", () =>
            {
                bronto.HoldBun();
            });
        }
コード例 #18
0
        public void HoldBunShouldNotifyOfSpecialPropertyChange()
        {
            Brontowurst bw = new Brontowurst();

            Assert.PropertyChanged(bw, "Special", () =>
            {
                bw.HoldBun();
            });
        }
コード例 #19
0
        public void HoldBunShouldNotifyOfPropertyChanged(string propertyName)
        {
            Brontowurst b = new Brontowurst();

            Assert.PropertyChanged(b, propertyName, () =>
            {
                b.HoldBun();
            });
        }
コード例 #20
0
        public void HoldingBunShouldNotifySpecialChange()
        {
            Brontowurst b = new Brontowurst();

            Assert.PropertyChanged(b, "Special", () =>
            {
                b.HoldBun();
            });
        }
コード例 #21
0
        public void SpecialShouldHoldBun()
        {
            Brontowurst bw = new Brontowurst();

            bw.HoldBun();
            string[] special = bw.Special;
            Assert.Contains <string>("Hold Bun", special);
            Assert.Equal <int>(1, special.Length);
        }
コード例 #22
0
        public void HoldingBunShouldNotifyIngredientsChange()
        {
            Brontowurst bw = new Brontowurst();

            Assert.PropertyChanged(bw, "Ingredients", () =>
            {
                bw.HoldBun();
            });
        }
コード例 #23
0
 private void Click_HoldBun(object sender, RoutedEventArgs e)
 {
     if (sender.Equals(Button_HoldBun))
     {
         if (DataContext is Order order)
         {
             _brontowurst.HoldBun();
         }
     }
 }
コード例 #24
0
        public void HoldBunShouldAddToSpecial()
        {
            Brontowurst b = new Brontowurst();

            b.HoldBun();
            Assert.Collection <string>(b.Special, item =>
            {
                Assert.Equal("Hold Bun", item);
            });
        }
コード例 #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);
        }
コード例 #26
0
        public void BrontowurstHoldALL()
        {
            Brontowurst bw = new Brontowurst();

            bw.HoldBun();
            bw.HoldPeppers();
            bw.HoldOnion();
            string[] test = { "Hold Bun", "Hold Peppers", "Hold Onions" };
            Assert.Equal(test, bw.Special);
        }
コード例 #27
0
        public void ShouldHaveCorrectEntreeSpecial()
        {
            Brontowurst b = new Brontowurst();

            b.HoldBun();
            CretaceousCombo combo = new CretaceousCombo(b);

            string[] special = { "Hold Bun", "Small Fryceritops", "Small Cola Sodasaurus" };
            Assert.Equal(combo.Special, special);
        }
コード例 #28
0
ファイル: BrontowurstTest.cs プロジェクト: dachen6/dino-diner
        public void HoldBunrShouldAddToSpecial()
        {
            Brontowurst bw = new Brontowurst();

            bw.HoldBun();
            Assert.Collection <string>(bw.Special, item =>
            {
                Assert.Equal("Hold Whole Wheat Bun", item);
            });
        }
コード例 #29
0
        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);
        }
コード例 #30
0
 private void OnHoldBun(object sender, RoutedEventArgs e)
 {
     if (brontowurst != null)
     {
         brontowurst.HoldBun();
     }
     else
     {
         ((Brontowurst)combo.Entree).HoldBun();
     }
 }