Exemplo n.º 1
0
        public void DeleteTest_Post()
        {
            // Act
            var result = controller.Delete(1);

            // Assert
            Assert.IsInstanceOfType(result, typeof(ViewResult));
            ViewResult viewResult = (ViewResult)result;

            Assert.IsInstanceOfType(viewResult.ViewData.Model, typeof(MaterialModel));
            MaterialModel MaterialModel = (MaterialModel)viewResult.ViewData.Model;

            Assert.AreEqual("Lâmpada", MaterialModel.Nome);
        }