public virtual IActionResult InterestcalcInitialValueMonthsInterestGet([FromRoute][Required] decimal?initialValue, [FromRoute][Required] int?months, [FromRoute][Required] decimal?interest) { InterestCalc calc = new InterestCalc(initialValue.Value, months.Value, interest.Value); return(StatusCode(200, calc.Calc())); }
public void Calcula100Com5Meses() { InterestCalc oi = new InterestCalc(100M, 5); Assert.Equal(105.1M, oi.Calc()); }
public virtual IActionResult CalculajurosGet([FromQuery] decimal?valorinicial, [FromQuery] int?meses) { InterestCalc calc = new InterestCalc(valorinicial.Value, meses.Value); return(StatusCode(200, calc.Calc())); }