public async void RetornaFalsoValorMinimoInicial() { //Arrange var request = new MovimentoRequest() { ValorMovimento = 1000, }; FundoResponse fundo = new FundoResponse() { InvestimentoInicialMinimo = 5000 }; //Act var resultado = await movimentoService.ValidarValorMinimoInicial(request, fundo); //Assert Assert.False(resultado); }
public static FundoResponse SelecionarFundoItau(FundoRequest pRequest) { var lAcessaDados = new ConexaoDbHelper(); FundoResponse lRetorno = new FundoResponse(); lRetorno.ListaFundo = new List <ClienteFundosInfo>(); ClienteFundosInfo lFundo; lAcessaDados.ConnectionStringName = "FundosItau"; using (var _DbCommand = lAcessaDados.CreateCommand(CommandType.StoredProcedure, "prc_sel_posicao_cotista")) { lAcessaDados.AddInParameter(_DbCommand, "@dsCpfCnpj", DbType.String, pRequest.CpfDoCliente.PadLeft(15, '0')); DataTable lTable = lAcessaDados.ExecuteDbDataTable(_DbCommand); foreach (DataRow lLinha in lTable.Rows) { lFundo = new ClienteFundosInfo() { Cota = lLinha["valorCota"].DBToDecimal(), DataAtualizacao = lLinha["dtReferencia"].DBToDateTime(), IOF = lLinha["valorIOF"].DBToDecimal(), IR = lLinha["valorIR"].DBToDecimal(), NomeFundo = lLinha["dsRazaoSocial"].ToString(), Quantidade = lLinha["quantidadeCotas"].DBToDecimal(), ValorBruto = lLinha["valorBruto"].DBToDecimal(), ValorLiquido = lLinha["valorLiquido"].DBToDecimal(), CodigoFundoItau = lLinha["dsCodFundo"].DBToString() }; lRetorno.ListaFundo.Add(lFundo); } } return(lRetorno); }
public async Task <bool> ValidarValorMinimoInicial(MovimentoRequest request, FundoResponse fundo) { return(await Task.FromResult(request.ValorMovimento >= fundo.InvestimentoInicialMinimo)); }