Exemple #1
0
        public async Task DeleteBasket()
        {
            // arrange
            var basket = new BasketOfItems(1);

            basket.AddUpdateOrRemoveItem(1, 3);
            await _sut.CreateBasketAsync(basket);

            // act
            await _sut.DeleteBasket(basket.Id);

            // assert
            var dbBasket = await _context.Baskets.FirstOrDefaultAsync(x => x.Id.Equals(basket.Id));

            Assert.That(dbBasket, Is.Null);
        }