public void ShouldHaveCorrectCaloriesForSize(Size size, uint cal)
        {
            AretinoAppleJuice aj = new AretinoAppleJuice();

            aj.Size = size;
            Assert.Equal(cal, aj.Calories);
        }
        public void ShouldReturnCorrectToStringBasedOnSize(Size size, string name)
        {
            AretinoAppleJuice aj = new AretinoAppleJuice();

            aj.Size = size;
            Assert.Equal(name, aj.ToString());
        }
        public void ShouldHaveCorrectPriceForSize(Size size, double price)
        {
            AretinoAppleJuice aj = new AretinoAppleJuice();

            aj.Size = size;
            Assert.Equal(price, aj.Price);
        }
예제 #4
0
        public void ShouldHaveCorrectCaloriesForSize(Size size, uint cal)
        {
            CandlehearthCoffee coffee = new CandlehearthCoffee();

            coffee.Size = size;
            Assert.Equal(cal, coffee.Calories);
        }
예제 #5
0
        public void ShouldHaveCorrectPriceForSize(Size size, double price)
        {
            CandlehearthCoffee coffee = new CandlehearthCoffee();

            coffee.Size = size;
            Assert.Equal(price, coffee.Price);
        }
예제 #6
0
        public void ShouldReturnCorrectToStringBasedOnSize(bool decaf, Size size, string name)
        {
            CandlehearthCoffee coffee = new CandlehearthCoffee();

            coffee.Decaf = decaf;
            coffee.Size  = size;
            Assert.Equal(name, coffee.ToString());
        }
 /// <summary>
 /// Sets the size for the selected drink.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void SelectSize(object sender, RoutedEventArgs e)
 {
     if (DataContext is Drink)
     {
         Size size = SizeSelectionMethod.DrinkSizeSelection(this, sender);
         soda.Size = size;
     }
     else
     {
         throw new NotImplementedException("Invalid type");
     }
 }