public void Then_the_product_should_no_longer_be_in_the_basket() { _basket.Remove(_product); _basket.Items().FirstOrDefault(i => i.Product == _product).Should().BeNull(); _basket.NumberOfItemsInBasket().Should().Be(0); }
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_product_should_no_longer_be_in_the_basket() { _basket.Remove(_product); Assert.IsNull(_basket.Items().FirstOrDefault(i => i.Product == _product)); Assert.AreEqual(0, _basket.NumberOfItemsInBasket()); }
public void Then_the_product_should_be_removed() { var newQty = 0; _basket.ChangeQtyOfProduct(newQty, _product); _basket.Items().FirstOrDefault(i => i.Product == _product).Qty.Should().Be(0); }
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); }
public void Then_the_quantity_of_that_product_should_update_to_match() { var newQty = 5; _basket.ChangeQtyOfProduct(newQty, _product); _basket.Items().FirstOrDefault(i => i.Product == _product).Qty .Should().Be(newQty); }
public void Then_the_basket_should_contain_a_total_of_one_of_the_product() { Assert.AreEqual(1, _basket.Items().FirstOrDefault(i => i.Product == _product).Quantity.Value); }
public void Then_the_quantity_for_the_product_should_be_2() { _basket.Items().FirstOrDefault(i => i.Product == _product).Qty.Should().Be(2); }
public void Then_the_quantity_for_the_product_should_be_2() { Assert.AreEqual(2, _basket.Items().FirstOrDefault(i => i.Product == _product).Quantity.Value); }
public void Then_the_basket_should_contain_a_total_of_one_of_the_product() { _basket.Items().FirstOrDefault(i => i.Product == _product).Qty.Should().Be(1); }