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

            Assert.Equal(105.1M, oi.Calc());
        }
Пример #4
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()));
        }
Пример #5
0
        public virtual IActionResult CalculajurosGet([FromQuery] decimal?valorinicial, [FromQuery] int?meses)
        {
            InterestCalc calc = new InterestCalc(valorinicial.Value, meses.Value);

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