public void CalculaJurosParametroMesesNulo() { CalculaJurosParametro taxaJuros = new CalculaJurosParametro() { ValorInicial = 100 }; CalculaJurosServices objCalculaJuros = new CalculaJurosServices(); Assert.Throws <Exception>(() => objCalculaJuros.CalculaJuros(taxaJuros)); }
public void ValidaTipoGetCalculaJuros() { CalculaJurosParametro taxaJuros = new CalculaJurosParametro() { ValorInicial = 100, Meses = 5 }; CalculaJurosServices objCalculaJuros = new CalculaJurosServices(); Assert.IsType <CalculaJurosDTO>(objCalculaJuros.CalculaJuros(taxaJuros)); }
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); }