public void ModelList() { BancoFacade fcd = new BancoFacade(); var lista = fcd.List(); // Assert Assert.IsTrue(lista.Count > 0); }
// GET: Banco public ActionResult Index() { try { BancoFacade fcd = new BancoFacade(); ViewBag.Lista = fcd.List(); return(View()); } catch (Exception ex) { return(View("Error")); } }
public void PruebaInsert() { BancoFacade fcd = new BancoFacade(); fcd.Insert(new Banco() { Nombre = "Banco 3", Direccion = "Direccion 3", FechaDeRegistro = DateTime.Now }); // Assert Assert.IsNotNull(true); }
public void Index() { //// Arrange //HomeController controller = new HomeController(); //// Act //ViewResult result = controller.Index() as ViewResult; BancoFacade fcd = new BancoFacade(); var lista = fcd.List(); // Assert Assert.IsNotNull(true); }
public ActionResult Form(Banco item) { try { item.FechaDeRegistro = DateTime.Now; //Validanmos los datos desde backend BancoFacade fcd = new BancoFacade(); fcd.Insert(item); return(RedirectToAction("Index")); } catch (Exception ex) { return(View("Error")); } }