public void AddItem_should_add_new_item_to_basket_if_does_not_exist() { _baskets.Add(new Basket(_testCustomerId, new List <Item>())); _sut.AddItem(_testCustomerId, new Item("Item1", 1)); _baskets.First().Items.Count.Should().Be(1); _baskets.First().Items.First().ItemId.Should().Be("Item1"); _baskets.First().Items.First().Quantity.Should().Be(1); }
public Basket AddItem(string customerId, Item item) { _basketStore.AddItem(customerId, item); return(GetBasketByCustomerId(customerId)); }