Esempio n. 1
0
        public void ListarTalleresTest()
        {
            TalleresWS.TallerServiceClient _proxy = new TalleresWS.TallerServiceClient();
            List<TallerEN> lista = null;
            int cantidad;
            try
            {
                lista = _proxy.ListarTalleres();
                cantidad = lista.Count;
                Assert.AreEqual(3, cantidad);
            }
            catch (FaultException<RepetidoException> fe)
            {
                //Assert.AreEqual(1, fe.Detail.Codigo);
                Assert.AreEqual("No se encontraron datos", fe.Detail.Mensaje);
                Assert.AreEqual("Validación de negocio", fe.Reason.ToString());
            }
            catch (Exception ex)
            {
                throw ex;
            }

        }
 public JsonResult ListaTalleres()
 {
     TalleresWS.TallerServiceClient _proxy = new TalleresWS.TallerServiceClient();
     return(Json(_proxy.ListarTalleres().ToList(), JsonRequestBehavior.AllowGet));
 }
 public JsonResult ListaTalleres()
 {
     TalleresWS.TallerServiceClient _proxy = new TalleresWS.TallerServiceClient();
     return Json(_proxy.ListarTalleres().ToList(), JsonRequestBehavior.AllowGet);
 }