Esempio n. 1
0
        public async Task DeleteConfirmedDeletesIdea()
        {
            // Get a valid idea out of the db
            var idea = await _context.Ideas.FirstOrDefaultAsync();

            Assume.That(idea, Is.Not.Null);

            await _controller.DeleteConfirmed(idea.Id);

            // Fetch the idea back out of the database
            var result = await _context.Ideas.SingleOrDefaultAsync(i => i.Id == idea.Id);

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