Beispiel #1
0
        private async Task ValidateMapObject(FundoModel fundo, InvestimentoModel investimento)
        {
            if (fundo is null)
            {
                investimento.Should().BeNull();
            }

            else if (investimento is null)
            {
                investimento.Should().BeNull();
            }

            else
            {
                investimento.Nome.Should().Be(fundo.Nome);
                investimento.ValorInvestido.Should().Be(fundo.CapitalInvestido);
                investimento.ValorTotal.Should().Be(fundo.ValorAtual);
                investimento.Vencimento.Should().Be(fundo.DataResgate);
                investimento.Ir.Should().Be(fundo.Ir);
                investimento.ValorResgate.Should().Be(fundo.ValorResgate);
            }
        }
Beispiel #2
0
        private async Task ValidateMapObject(RendaFixaModel rendaFixa, InvestimentoModel investimento)
        {
            if (rendaFixa is null)
            {
                investimento.Should().BeNull();
            }

            else if (investimento is null)
            {
                investimento.Should().BeNull();
            }

            else
            {
                investimento.Nome.Should().Be(rendaFixa.Nome);
                investimento.ValorInvestido.Should().Be(rendaFixa.CapitalInvestido);
                investimento.ValorTotal.Should().Be(rendaFixa.CapitalAtual);
                investimento.Vencimento.Should().Be(rendaFixa.Vencimento);
                investimento.Ir.Should().Be(rendaFixa.Ir);
                investimento.ValorResgate.Should().Be(rendaFixa.ValorResgate);
            }
        }
Beispiel #3
0
        private async Task ValidateMapObject(TesouroDiretoModel tesouroDireto, InvestimentoModel investimento)
        {
            if (tesouroDireto is null)
            {
                investimento.Should().BeNull();
            }

            else if (investimento is null)
            {
                investimento.Should().BeNull();
            }

            else
            {
                investimento.Nome.Should().Be(tesouroDireto.Nome);
                investimento.ValorInvestido.Should().Be(tesouroDireto.ValorInvestido);
                investimento.ValorTotal.Should().Be(tesouroDireto.ValorTotal);
                investimento.Vencimento.Should().Be(tesouroDireto.Vencimento);
                investimento.Ir.Should().Be(tesouroDireto.Ir);
                investimento.ValorResgate.Should().Be(tesouroDireto.ValorResgate);
            }
        }