Example #1
0
        public void SizeChangeNotifiesAll()
        {
            Triceritots j = new Triceritots();

            j.Size = Size.Large;

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

            Assert.PropertyChanged(j, "Price", () =>
            {
                j.Size = Size.Small;
            }
                                   );
            j.Size = Size.Medium;

            Assert.PropertyChanged(j, "Calories", () =>
            {
                j.Size = Size.Large;
            }
                                   );
        }
        public void ShouldUseCorrectCaloriesForLarge()
        {
            Triceritots tt = new Triceritots();

            tt.Size = Size.Large;
            Assert.Equal <uint>(590, tt.Calories);
        }
        public void ShouldBeAbleToSetSizeToLarge()
        {
            Triceritots tt = new Triceritots();

            tt.Size = Size.Large;
            Assert.Equal <Size>(Size.Large, tt.Size);
        }
Example #4
0
        public void ShouldBeAbleToSetSizeToMedium()
        {
            Triceritots tt = new Triceritots();

            tt.Size = Size.Medium;
            Assert.Equal <Size>(Size.Medium, tt.Size);
        }
        public void ShouldUseCorrectPriceForLarge()
        {
            Triceritots tt = new Triceritots();

            tt.Size = Size.Large;
            Assert.Equal(1.95, tt.Price, 2);
        }
Example #6
0
        public void DescriptionShouldBeCorrectForSizeMedium()
        {
            Triceritots tt = new Triceritots();

            tt.Size = Size.Medium;
            Assert.Equal("Medium Triceritots", tt.Description);
        }
Example #7
0
        public void ShouldUseCorrectPriceForMedium()
        {
            Triceritots tt = new Triceritots();

            tt.Size = Size.Medium;
            Assert.Equal(1.45, tt.Price, 2);
        }
Example #8
0
        public void DescriptionShouldBeCorrect(Size size)
        {
            Triceritots tt = new Triceritots();

            tt.Size = size;
            Assert.Equal($"{size.ToString()} Triceritots", tt.Description);
        }
Example #9
0
        public void CheckPropertyChangedTriceritots()
        {
            Triceritots ft = new Triceritots();

            Assert.PropertyChanged(ft, "Price", () => ft.Price *= 2);
            Assert.PropertyChanged(ft, "Size", () => ft.Size    = Size.Medium);
        }
Example #10
0
        public void CorrectMediumToString()
        {
            Triceritots t = new Triceritots();

            t.MakeMedium();
            Assert.Equal("Medium Triceritots", t.ToString());
        }
Example #11
0
        public void CorrectLargeToString()
        {
            Triceritots t = new Triceritots();

            t.MakeLarge();
            Assert.Equal("Large Triceritots", t.ToString());
        }
Example #12
0
        public void CorrectLargeDescription()
        {
            Triceritots t = new Triceritots();

            t.MakeLarge();
            Assert.Equal("Large Triceritots", t.Description);
        }
Example #13
0
        public void CorrectMediumDescription()
        {
            Triceritots t = new Triceritots();

            t.MakeMedium();
            Assert.Equal("Medium Triceritots", t.Description);
        }
        public void TotClick(object sender, RoutedEventArgs args)
        {
            if (DataContext is Order order)
            {
                if (fromCombo)
                {
                    CustomizeCombo c = new CustomizeCombo();
                    c.choseFries  = false;
                    c.choseTots   = true;
                    c.choseSticks = false;
                    c.choseMac    = false;
                    c.CheckSide();
                    //NavigationService.Navigate(c);

                    if (CollectionViewSource.GetDefaultView(order.Items).CurrentItem is CretaceousCombo combo)
                    {
                        Triceritots t = new Triceritots();
                        t.Size     = combo.Size;
                        combo.Side = t;
                    }
                    NavigationService.GoBack();
                }
                else
                {
                    order.Items.Add(new Triceritots());
                    CollectionViewSource.GetDefaultView(order.Items).MoveCurrentToLast();
                }
            }
        }
Example #15
0
        public void ToStringShouldGiveNameForSize(Size size)
        {
            Triceritots tt = new Triceritots();

            tt.Size = size;
            Assert.Equal($"{size} Triceritots", tt.ToString());
        }
Example #16
0
        public void ShouldHaveCorrectDescriptions(Size sz)
        {
            Triceritots tt = new Triceritots();

            tt.Size = sz;
            Assert.Equal($"{sz} Triceritots", tt.Description);
        }
Example #17
0
        public void ToStringDescriptionForSize(Size size)
        {
            Triceritots tt = new Triceritots();

            tt.Size = size;
            Assert.Equal($"{size} Triceritots", tt.ToString());
        }
Example #18
0
        public void DescriptionShouldBeCorrect(Size size)
        {
            Triceritots tots = new Triceritots();

            tots.Size = size;
            Assert.Equal($"{size} Triceritots", tots.Description);
        }
Example #19
0
        public void DescriptionShouldBeCorrectForSizeLarge()
        {
            Triceritots tt = new Triceritots();

            tt.Size = Size.Large;
            Assert.Equal("Large Triceritots", tt.Description);
        }
Example #20
0
        public void TriceritotsDescriptionTest(Size s)
        {
            Triceritots t = new Triceritots();

            t.Size = s;
            Assert.Equal(s + " Triceritots", t.Description);
        }
Example #21
0
        public void ShouldUseCorrectCaloriesForMedium()
        {
            Triceritots tt = new Triceritots();

            tt.Size = Size.Medium;
            Assert.Equal <uint>(410, tt.Calories);
        }
Example #22
0
        public void TriceritotsDescriptionShouldGiveNameForSize(Size size)
        {
            Triceritots tt = new Triceritots();

            tt.Size = size;
            Assert.Equal($"{size} Triceritots", tt.Description);
        }
Example #23
0
        public void CorrectToString()
        {
            Triceritots tt = new Triceritots();

            tt.Size = Size.Large;
            Assert.Equal((tt.Size.ToString() + " Triceritots"), tt.ToString());
        }
Example #24
0
        public void SpecialShouldBeEmpty()
        {
            Triceritots tt = new Triceritots();

            Assert.Empty(tt.Special);
            tt.Size = Size.Large;
            Assert.Empty(tt.Special);
        }
Example #25
0
        public void SmallDescriptionShouldBeCorrect()
        {
            Triceritots tt = new Triceritots();

            tt.Size = Size.Medium;
            tt.Size = Size.Small;
            Assert.Equal("Small Triceritots", tt.Description);
        }
Example #26
0
        public void ChangingSizeShouldNotifyOfPropertyChange(string s)
        {
            Triceritots w = new Triceritots();

            Assert.PropertyChanged(w, s, () => { w.Size = Size.Medium; });
            Assert.PropertyChanged(w, s, () => { w.Size = Size.Large; });
            Assert.PropertyChanged(w, s, () => { w.Size = Size.Small; });
        }
Example #27
0
        public void SwitchingToSmallDescriptionShouldBeCorrect()
        {
            Triceritots tt = new Triceritots();

            tt.Size = Size.Large;
            tt.Size = Size.Small;
            Assert.Equal("Small Triceritots", tt.Description);
        }
Example #28
0
        public void PropertyShouldChangeTriceritots()
        {
            Triceritots tt = new Triceritots();

            Assert.PropertyChanged(tt, "Price", () => tt.Size    = Size.Large);
            Assert.PropertyChanged(tt, "Calories", () => tt.Size = Size.Large);
            Assert.PropertyChanged(tt, "Size", () => tt.Size     = Size.Large);
        }
Example #29
0
        public void SetSizeNotifyChanges()
        {
            Triceritots tt = new Triceritots();

            Assert.PropertyChanged(tt, "Size", () => tt.Size     = Size.Large);
            Assert.PropertyChanged(tt, "Calories", () => tt.Size = Size.Large);
            Assert.PropertyChanged(tt, "Price", () => tt.Size    = Size.Large);
        }
        public void ChangingSizeShouldNotifyOfPropertyChange(string propName)
        {
            Triceritots tt = new Triceritots();

            Assert.PropertyChanged(tt, propName, () => tt.Size = Size.Small);
            Assert.PropertyChanged(tt, propName, () => tt.Size = Size.Medium);
            Assert.PropertyChanged(tt, propName, () => tt.Size = Size.Large);
        }