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

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

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

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