Beispiel #1
0
        public void DadoPercentualObjetivoValorInvestidoPorTipoEValorTotalInvestido_DeveAtualizarOrientacaoCorretamente
            (decimal percentualObjetivo, decimal valorInvestidoAtivo, decimal valorTotalInvestido, EOrientacao orientacao)
        {
            // Arrange
            DistribuicaoPorTipoInvestimento distribuicao = new DistribuicaoPorTipoInvestimento(Guid.NewGuid(), Guid.NewGuid(), new Valores(percentualObjetivo));

            // Act
            distribuicao.AtualizarOrientacao(valorInvestido: valorInvestidoAtivo, ValorTotalInvestido: valorTotalInvestido);
            // Assert
            Assert.Equal(distribuicao.Orientacao, orientacao);
        }
Beispiel #2
0
        public void DadoPercentualObjetivoValorInvestidoPorAtivoEValorTotalInvestido_DeveAtualizarOrientacaoCorretamente
            (decimal percentualObjetivo, decimal valorInvestidoAtivo, decimal valorTotalInvestido, EOrientacao orientacao)
        {
            // Arrange
            DistribuicaoPorAtivo distribuicao = new DistribuicaoPorAtivo(Guid.NewGuid(), Guid.NewGuid(), new Valores(percentualObjetivo));
            Ativo ativo = new Ativo(Guid.NewGuid(), new Informacoes("Empresa Teste", "Caracteristica Teste"), "TEST3", 10, Guid.NewGuid());

            distribuicao.AlterarAtivo(ativo);
            // Act
            distribuicao.AtualizarOrientacao(valorInvestido: valorInvestidoAtivo, ValorTotalInvestido: valorTotalInvestido);
            // Assert
            Assert.Equal(distribuicao.Orientacao, orientacao);
        }