Пример #1
0
        public void ListarPlatillos()
        {
            ObtenerToken("ADMINISTRADOR", "ASDF");
            var platillo = new Platillo()
            {
                Token = _token
            };
            var platilloList = platillo.ObtenerPlatillos();

            Assert.AreEqual(true, platilloList != null);
        }
Пример #2
0
        public ActionResult VerPlatillos()
        {
            if (string.IsNullOrEmpty(_token))
            {
                RedirectToAction("Index", "Home");
            }
            _token = Session["Token"].ToString();
            var plat = new Platillo()
            {
                Token = _token
            };

            ViewData["Platillo"] = plat.ObtenerPlatillos();
            return(View());
        }