Пример #1
0
        public void CapitalPaymentShouldCalculateCorrectly(double rate, short numberPeriods, double presentValue, double futureValue,
                                                           DueDate due)
        {
            //Act
            var correctSut = Math.Abs(Financial.CumPrinc(rate, numberPeriods, presentValue, 1, 1, PaymentDue.EndOfPeriod));
            var sut        = Math.Abs(FinancialCalculations.CapitalPayment(rate, 1, numberPeriods, presentValue, futureValue, due));

            var isEqual = TestHelper.IsEqualDoubles(sut, correctSut);

            //Assert
            isEqual.Should().BeTrue();
        }