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

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

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

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