Exemplo n.º 1
0
        public async Task Get_ShouldReturnResponseIndicadorWithAllObj()
        {
            //Arrange:
            ExternalApiContext   api             = new ExternalApiContext();
            IIndicadorRepository _contextDA      = new IndicadorRepository(api);
            IndicadorActions     _contextActions = new IndicadorActions(_contextDA);
            IndicadorController  pController     = new IndicadorController(_contextActions);

            FiltroIndicador param = new FiltroIndicador {
                TipoIndicador = ""
            };

            //Act:
            Response <Indicador_Entity> response = await pController.Get(param);

            //CollectionAssert:
            var responseErrorCode = response.CodigoError;
            var responseSystemMsg = response.MensajeSistema;
            var responseHumanMsg  = response.MensajeHumano;
            var responseList      = response.Contenido;

            Assert.AreEqual("E00", responseErrorCode);
            Assert.AreEqual("Record(s) found", responseSystemMsg);
            Assert.AreEqual("Consulta exitosa!", responseHumanMsg);
        }
Exemplo n.º 2
0
 public IndicadorRepository(ExternalApiContext dbContext)
 {
     apiContext = dbContext;
 }