Ejemplo n.º 1
0
 public IHttpActionResult ObterFundoInvestimento(FiltroObterFundoDTO filtro)
 {
     try
     {
         return(Ok(_fundosService.ObterFundoInvestimento(filtro)));
     }
     catch (Exception ex)
     {
         log.Error("Erro ObterFundoInvestimento: " + ex);
         throw ex;
     }
 }
Ejemplo n.º 2
0
        public RetornoDTO <FundoDTO> ObterFundoInvestimento(FiltroObterFundoDTO filtro)
        {
            FundoDTO fundoDTO   = new FundoDTO();
            var      retornoDTO = new RetornoDTO <FundoDTO>();

            fundoDTO = _fundosMapper.CadastroFundo_TO_FundoDTO(
                _integracaoCVM.ObterFundo(filtro.CnpjFundo)
                );

            retornoDTO.Sucesso = true;
            retornoDTO.Retorno = fundoDTO;

            return(retornoDTO);
        }
Ejemplo n.º 3
0
        public void ObterFundoInvestimentoTest()
        {
            var cadastroFundo = new CadastroFundo();
            var filtro        = new FiltroObterFundoDTO {
                CnpjFundo = "00.017.024/0001-53"
            };

            _integracaoCVM.Setup(x => x.ObterFundo(filtro.CnpjFundo)).Returns(cadastroFundo);

            _fundosMapper.Setup(x => x.CadastroFundo_TO_FundoDTO(It.IsAny <CadastroFundo>())).Returns(new FundoDTO());


            FundosService fundosService = new FundosService(_integracaoCVM.Object,
                                                            _fundosMapper.Object);

            var res = fundosService.ObterFundoInvestimento(filtro);

            Assert.IsNotNull(res.Retorno);
            Assert.IsTrue(res.Sucesso);
        }
Ejemplo n.º 4
0
 public IList <Fundo> ListarFundos(FiltroObterFundoDTO filtro)
 {
     throw new System.NotImplementedException();
 }