public void GetTest()
        {
            int   AutorId  = 1;    // TODO: Inicializar en un valor adecuado
            Autor expected = null; // TODO: Inicializar en un valor adecuado
            Autor actual;

            actual = AutorBLL.Get(AutorId);
            Assert.AreNotEqual(expected, actual);
            //Assert.Inconclusive("Compruebe la exactitud de este método de prueba.");
        }
Exemple #2
0
        //
        // GET: /Autor/Details/5

        public ActionResult Details(int id)
        {
            try {
                Autor a = AutorBLL.Get(id);
                if (a != null)
                {
                    return(View(a));
                }
                else
                {
                    return(View("~/Views/Shared/Error.cshtml", new Models.ManejadorError("Nulo", "", "", "", "")));
                }
            } catch (Exception ex) {
                return(View("~/Views/Shared/Error.cshtml", new Models.ManejadorError(ex)));
            }
        }
Exemple #3
0
        //
        // GET: /Autor/Edit/5

        public ActionResult Edit(int id)
        {
            try {
                ViewBag.Paises = BLL.PaisBLL.ListActivos();
                Autor a = AutorBLL.Get(id);
                if (a != null && ViewBag.Paises != null)
                {
                    return(View(a));
                }
                else
                {
                    return(View("~/Views/Shared/Error.cshtml", new Models.ManejadorError("Nulo", "", "", "", "")));
                }
            } catch (Exception ex) {
                return(View("~/Views/Shared/Error.cshtml", new Models.ManejadorError(ex)));
            }
        }
        public void UpdateTest()
        {
            Autor a = AutorBLL.Get(2);

            // a.Id = a.Id;
            a.Nombres   = "pablo";
            a.Apellidos = "perez";
            a.Pais      = PaisBLL.Get(1);
            a.Estado    = 1;

            AutorBLL.Update(a);

            a = AutorBLL.Get(2);

            Assert.AreEqual("pablo", a.Nombres);
            Assert.AreEqual("perez", a.Apellidos);
            //Assert.Inconclusive("Un método que no devuelve ningún valor no se puede comprobar.");
        }