Esempio n. 1
0
 public IItem AddTopping(Topping topping)
 {
     _toppings.Add(topping);
     return(new Item(_name, _basePrice, _toppings));
 }
Esempio n. 2
0
        public void ShouldReturnToppingPriceForLarge()
        {
            Topping topping = new Topping("cheese", .15d);

            topping.Price(18.0d).Should().Be(2.70d);
        }
Esempio n. 3
0
        public void ShouldAddToDescription()
        {
            Topping topping = new Topping("cheese", .15d);

            topping.AddToDescription("base with").Should().Be("base with cheese");
        }
Esempio n. 4
0
        public void ShouldReturnToppingPriceForMedium()
        {
            Topping topping = new Topping("cheese", .15d);

            topping.Price(15d).Should().Be(2.25d);
        }