Exemplo n.º 1
0
        public void TestDepartmentIndex()
        {
            WebSite.Controllers.AreasController controler = new AreasController();

            var actResult = controler.Index() as ViewResult;

            Assert.That(actResult.ViewName, Is.EqualTo("Index"));
        }
Exemplo n.º 2
0
        public void Areas_get_List()
        {
            var areaReportMock = new Mock<IAreasRepositorio>();

            areaReportMock.Setup(a => a.ListarAreasT()).Returns(new List<AREAS>()
            {
                new AREAS{ID_AREA=1,NOMBRE="Sistemas"},
                new AREAS{ID_AREA=2,NOMBRE="Produccion"},
                new AREAS{ID_AREA=3,NOMBRE="Finanzas"}
            });

            var controlador = new AreasController(areaReportMock.Object);
            var result = controlador.listarAreasTest() as ViewResult;
            Assert.IsNotNull(result);

            List<AREAS> list = result.Model as List<AREAS>;
            Assert.IsNotNull(list);

            Assert.IsTrue(igualValores(1, "Sistemas", list[0]));
            Assert.IsTrue(igualValores(2, "Produccion", list[1]));
            Assert.IsTrue(igualValores(3, "Finanzas", list[2]));
        }
Exemplo n.º 3
0
 public void TestMethod1()
 {
     var areControl = new AreasController();
     //ViewResult resultado = WebSite.Controllers.AreasController as ViewResult;
 }
Exemplo n.º 4
0
 public void Pruebaresul()
 {
     AreasController controlador = new AreasController();
     ViewResult result = controlador.Prueba() as ViewResult;
     Assert.IsNotNull(result);
 }
Exemplo n.º 5
0
 public void TestMethod1()
 {
     AreasController controller = new AreasController();
     ViewResult result = controller.Index() as ViewResult;
     Assert.IsNotNull(result);
 }