Ejemplo n.º 1
0
        public void ThoughtService_DeleteThought_GetAllDoesntContainsIt()
        {
            // arrange
            IThoughtService service = GetServiceInstance();
            ThoughtModel    thought = GetRandomThought();

            // act
            service.Create(thought);
            Assert.Contains(service.GetAll(), t => t.Id == thought.Id);
            service.Delete(thought.Id);

            // assert
            Assert.DoesNotContain(service.GetAll(), t => t.Id == thought.Id);
        }
 public IActionResult Delete(Guid id)
 {
     _thoughtService.Delete(id);
     return(RedirectToAction("All"));
 }