Esempio n. 1
0
        public void DetailsTest()
        {
            // Act
            var result = controller.Details(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("Eletrônico", MaterialModel.Nome);
        }