adamsaghy commented on code in PR #6432:
URL: https://github.com/apache/fineract/pull/6432#discussion_r4004438818
##########
fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/WorkingCapitalAmortizationScheduleStepDef.java:
##########
@@ -330,6 +330,33 @@ public void verifyRetrievedPaymentDetailsByPaymentNo(final
DataTable dataTable)
assertions.assertAll();
}
+ @Then("The last projected payment amount is the smaller tail remainder")
+ public void verifyLastProjectedPaymentIsSmallerTail() {
+ final ProjectedAmortizationScheduleData response =
getRetrievedSchedule();
+ final List<ProjectedAmortizationSchedulePaymentData> payments =
response.getPayments();
+ assertThat(payments).as("payments list").hasSizeGreaterThan(1);
+ final ProjectedAmortizationSchedulePaymentData last =
payments.getLast();
+ assertThat(last.getPaymentNo()).as("last paymentNo").isGreaterThan(0);
+ assertThat(last.getExpectedBalance()).as("last
expectedBalance").isEqualByComparingTo(BigDecimal.ZERO);
+ assertThat(last.getExpectedDiscountFeeBalance()).as("last
expectedDiscountFeeBalance").isEqualByComparingTo(BigDecimal.ZERO);
+ final ProjectedAmortizationSchedulePaymentData firstPayment =
payments.get(1);
+ assertThat(last.getExpectedPaymentAmount()).as("tail
expectedPaymentAmount must be positive").isPositive();
+ assertThat(last.getExpectedPaymentAmount()).as("tail
expectedPaymentAmount must be strictly less than the regular instalment %s",
+
firstPayment.getExpectedPaymentAmount()).isLessThan(firstPayment.getExpectedPaymentAmount());
+ }
+
+ @Then("The retrieved amortization schedule has at least {int} payment
rows")
Review Comment:
Not used anywhere
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]