public static BasketItem create_item_for(ProductSnapshot product_snapshot) { return new BasketItem(product_snapshot, new NonNegativeQuantity(1)); }
public void add(ProductSnapshot product_snapshot, IBasketPricingService basket_pricing_service) { // TODO: Check for null values and invalid data if (basket_contains_an_item_for(product_snapshot)) { get_item_for(product_snapshot).increase_item_quantity_by(new NonNegativeQuantity(1)); } else { _items.Add(BasketItemFactory.create_item_for(product_snapshot)); } recalculate_basket_totals(basket_pricing_service); }