public async Task DeleteAsyncDeckAsync_Should_ReturnOk() { // Arrange var dbContext = InMemoryDbContext.CreateDbContext(); var deck = _fixture.Create <DeckEntity>(); var expectedNumberOfDeletion = 1 + deck.Cards.Count; dbContext.Add(deck); dbContext.SaveChanges(); // Act var deckRepository = new DeckRepository(dbContext); var result = await deckRepository.DeleteAsync(deck.DeckId); // Assert Assert.AreEqual(result, expectedNumberOfDeletion); }