public void Then_the_product_should_be_removed() { var newQty = new NonNegativeQuantity(0); _basket.ChangeQuantityOfProduct(newQty, _product); Assert.IsNull(_basket.Items().FirstOrDefault(i => i.Product == _product)); }
public void Then_the_quantity_of_that_product_should_update_to_match() { var newQty = new NonNegativeQuantity(5); _basket.ChangeQuantityOfProduct(newQty, _product); Assert.AreEqual(newQty.Value, _basket.Items().FirstOrDefault(i => i.Product == _product).Quantity.Value); }