Ejemplo n.º 1
0
        public void DeletePratoFail()
        {
            var controller = new PratoController(db);

            var actionResult = controller.DeletePrato(1);
            var result       = actionResult as NotFoundResult;

            Assert.IsNotNull(result);
            Assert.AreEqual(404, result.StatusCode);
        }
Ejemplo n.º 2
0
        public void DeletePrato()
        {
            var pratoTest  = repo.Where(p => p.Nome == "Prato6").FirstOrDefault();
            var controller = new PratoController(db);

            var actionResult = controller.DeletePrato(pratoTest.Id);
            var result       = actionResult as OkObjectResult;

            Assert.IsNotNull(result);
            Assert.AreEqual(200, result.StatusCode);
        }