public void PruebaControllerObtenerLogrosCantidadResultadosExc() { DTOLogroPartidoId dtoLogroPartidoId = FabricaDTO.CrearDTOLogroPartidoId(); dtoLogroPartidoId.IdPartido = 18;//Cambiar Assert.AreEqual(HttpStatusCode.InternalServerError, controller.ObtenerLogrosCantidadResultados(dtoLogroPartidoId).StatusCode); }
public HttpResponseMessage ObtenerLogrosVFResultados(DTOLogroPartidoId dto) { try { TraductorLogroPartidoId traductorPartido = FabricaTraductor.CrearTraductorLogroPartidoId(); Entidad partido = traductorPartido.CrearEntidad(dto); Comando comando = FabricaComando.CrearComandoObtenerLogrosVFResultados(partido); comando.Ejecutar(); TraductorLogroVFResultado traductorLogros = FabricaTraductor.CrearTraductorLogroVFResultado(); List <DTOLogroVFResultado> dtos = traductorLogros.CrearListaDto(comando.GetEntidades()); return(Request.CreateResponse(HttpStatusCode.OK, dtos)); } catch (ObjetoNullException exc) { return(Request.CreateResponse(HttpStatusCode.InternalServerError, exc.Mensaje)); } catch (LogrosFinalizadosNoExisteException exc) { logger.Error(exc, exc.Message); return(Request.CreateResponse(HttpStatusCode.InternalServerError, exc.Mensaje)); } catch (Exception exc) { ExcepcionGeneral personalizada = new ExcepcionGeneral(exc.InnerException, DateTime.Now); logger.Error(exc, exc.Message); return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, personalizada.Mensaje)); } }
public void PruebaControllerObtenerLogrosCantidadPendiente() { DTOLogroPartidoId dtoLogroPartidoId = FabricaDTO.CrearDTOLogroPartidoId(); dtoLogroPartidoId.IdPartido = 14;//Cambiar Assert.AreEqual(HttpStatusCode.OK, controller.ObtenerLogrosCantidadPendientes(dtoLogroPartidoId).StatusCode); }
public void PruebaControllerObtenerLogrosEquipoResultado() { DTOLogroPartidoId dtoLogroPartidoId = FabricaDTO.CrearDTOLogroPartidoId(); dtoLogroPartidoId.IdPartido = 14;//Cambiar Assert.AreEqual(HttpStatusCode.OK, controller.ObtenerLogrosEquipoResultados(dtoLogroPartidoId).StatusCode); }