Пример #1
0
        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()));
        }
Пример #2
0
        public void Calcula100Com5Meses()
        {
            InterestCalc oi = new InterestCalc(100M, 5);

            Assert.Equal(105.1M, oi.Calc());
        }
Пример #3
0
        public virtual IActionResult CalculajurosGet([FromQuery] decimal?valorinicial, [FromQuery] int?meses)
        {
            InterestCalc calc = new InterestCalc(valorinicial.Value, meses.Value);

            return(StatusCode(200, calc.Calc()));
        }