public async Task DeleteByIdAsync_DeleteWithId1_DeletesItem() { var numberOfItemsInDatabase = await _context.Subjects.AsQueryable().CountAsync(); await _service.DeleteEntityByIdAsync("subject2"); _context.Subjects.AsQueryable().CountAsync().Result.Should().Be(numberOfItemsInDatabase - 1); _context.Subjects.FindAsync("subject2").Result.Should().BeNull(); }