Beispiel #1
0
        public async Task DeleteAsyncShouldDeleteDrink()
        {
            var db = DbInfrastructure.GetDatabase();

            var drinkService = new DrinkService(db);

            await AddDrinkToDb(drinkService);

            var drink = await db.Drinks.FirstAsync();

            await drinkService.DeleteAsync(drink.Id);

            drink = await db.Drinks.FirstOrDefaultAsync();

            drink.Should().BeNull();
        }