public void ShouldRemoveImmutably() { //Arrange Toppings initial = new Toppings(); IToppings multiple = initial.Add(Topping.Mushroom).Add(Topping.Mozzarella); //Act IToppings removed = multiple.Remove(Topping.Mushroom); //Assert removed.Cost(new Money(10)).Should().Be(new Money(1)); multiple.Cost(new Money(10)).Should().Be(new Money(2)); }
public Money Price() => _basePrice + _toppings.Cost(_basePrice);