@Test public void testGetPeriodicPaymentCompoundSemiPaymentBiMonthly() { AmortizationAttributes amAttrs = generateAmortizationAttributesObjectTemplate(); amAttrs.setLoanAmount(USD50000.divide(5)); amAttrs.setInterestRateAsPercent(10.); amAttrs.setCompoundingPeriodsPerYear(TimePeriod.SemiAnnually.getPeriodsPerYear()); amAttrs.setAmortizationPeriodInMonths(12); amAttrs.setPaymentFrequency(TimePeriod.BiMonthly.getPeriodsPerYear()); MonetaryAmount result = AmortizationCalculator.getPeriodicPayment(amAttrs); MonetaryAmount expectedResult = ofUSD(1763.61); assertEquals("Amortized, compounded semi-annual, payment semimonthly", expectedResult, result); }
@Test public void testPaymentDateBiMonthly() { testPaymentDatesWithMonthlyIntervals(TimePeriod.BiMonthly.getPeriodsPerYear()); }