public void ConstrutorCompleto() { InterestCalc oi = new InterestCalc(100M, 5); Assert.Equal(100M, oi.Initial); Assert.Equal(5, oi.Months); Assert.Equal(0.01M, oi.Interest); }
public void ConstrutorVazio() { InterestCalc oi = new InterestCalc(); }
public void Calcula100Com5Meses() { InterestCalc oi = new InterestCalc(100M, 5); Assert.Equal(105.1M, oi.Calc()); }
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 virtual IActionResult CalculajurosGet([FromQuery] decimal?valorinicial, [FromQuery] int?meses) { InterestCalc calc = new InterestCalc(valorinicial.Value, meses.Value); return(StatusCode(200, calc.Calc())); }