Ejemplo n.º 1
0
        public void Form()
        {
            //// Arrange
            //HomeController controller = new HomeController();

            //// Act
            //ViewResult result = controller.Index() as ViewResult;

            OrdenDePagoController controller = new OrdenDePagoController();
            ViewResult            result     = controller.Form() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }
Ejemplo n.º 2
0
        public void FormPost()
        {
            //// Arrange
            //HomeController controller = new HomeController();

            //// Act
            //ViewResult result = controller.Index() as ViewResult;

            OrdenDePagoController controller = new OrdenDePagoController();
            var result = controller.Form(new OrdenDePago()
            {
                Monto       = 100.20,
                Moneda      = "PEN",
                Estado      = "P",
                FechaDePago = DateTime.Now,
                IdSucursal  = 4
            }) as RedirectToRouteResult;

            //Regresando a la pagina inicial
            Assert.IsTrue(result.RouteValues["action"].Equals("Index"));
        }