示例#1
0
        public void CalculaJurosParametroMesesNulo()
        {
            CalculaJurosParametro taxaJuros = new CalculaJurosParametro()
            {
                ValorInicial = 100
            };

            CalculaJurosServices objCalculaJuros = new CalculaJurosServices();

            Assert.Throws <Exception>(() => objCalculaJuros.CalculaJuros(taxaJuros));
        }
示例#2
0
        public void ValidaTipoGetCalculaJuros()
        {
            CalculaJurosParametro taxaJuros = new CalculaJurosParametro()
            {
                ValorInicial = 100,
                Meses        = 5
            };

            CalculaJurosServices objCalculaJuros = new CalculaJurosServices();

            Assert.IsType <CalculaJurosDTO>(objCalculaJuros.CalculaJuros(taxaJuros));
        }
示例#3
0
        public void CalculaJuros()
        {
            CalculaJurosParametro taxaJuros = new CalculaJurosParametro()
            {
                ValorInicial = 100,
                Meses        = 5
            };

            CalculaJurosDTO retorno = new CalculaJurosDTO()
            {
                ValorFinal = 10510100501
            };

            CalculaJurosServices objCalculaJuros = new CalculaJurosServices();

            Assert.Equal(retorno.ValorFinal, objCalculaJuros.CalculaJuros(taxaJuros).ValorFinal);
        }