oleksii-novikov-onix commented on code in PR #4592:
URL: https://github.com/apache/fineract/pull/4592#discussion_r2051082114
##########
integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanInterestRecalculationCOBTest.java:
##########
@@ -93,6 +93,53 @@ private void logLoanDetails(GetLoansLoanIdResponse
loanDetails) {
period.getPrincipalDue(), period.getFeeChargesDue(),
period.getPenaltyChargesDue(), period.getInterestDue()));
}
+ @Test
+ public void
testInterestRecalculationInCaseOfTinyAmountOfRepaymentsEveryRepaymentPeriodForProgressiveLoanSameAsRepaymentPeriod()
{
+ AtomicReference<Long> loanIdRef = new AtomicReference<>();
+ runAt("1 January 2023", () -> {
+ PostLoanProductsResponse loanProduct =
loanProductHelper.createLoanProduct(create4IProgressive() //
+
.recalculationRestFrequencyType(RecalculationRestFrequencyType.SAME_AS_REPAYMENT_PERIOD)
//
+ );//
+ Long loanId = applyAndApproveProgressiveLoan(client.getClientId(),
loanProduct.getResourceId(), "1 January 2023", 10000.0,
+ 86.42, 6, null);
+ loanIdRef.set(loanId);
+ disburseLoan(loanId, BigDecimal.valueOf(8000), "1 January 2023");
+ });
+ runAt("1 February 2023", () -> {
+ Long loanId = loanIdRef.get();
+ loanTransactionHelper.makeLoanRepayment(loanId, "Repayment", "1
February 2023", 0.01);
+ });
+ runAt("1 March 2023", () -> {
+ Long loanId = loanIdRef.get();
+ loanTransactionHelper.makeLoanRepayment(loanId, "Repayment", "1
March 2023", 0.01);
+ });
+ runAt("1 April 2023", () -> {
+ Long loanId = loanIdRef.get();
+ loanTransactionHelper.makeLoanRepayment(loanId, "Repayment", "1
April 2023", 0.01);
+ });
+ runAt("1 May 2023", () -> {
+ Long loanId = loanIdRef.get();
+ loanTransactionHelper.makeLoanRepayment(loanId, "Repayment", "1
May 2023", 0.01);
+ });
+ runAt("1 june 2023", () -> {
+ Long loanId = loanIdRef.get();
+ loanTransactionHelper.makeLoanRepayment(loanId, "Repayment", "1
june 2023", 0.01);
+ });
+ runAt("17 june 2023", () -> {
Review Comment:
17 june 2023 -> 1 June 2023. Is the test is case insensititve? Is the test
case-insensitive?
--
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]