adamsaghy commented on code in PR #5078:
URL: https://github.com/apache/fineract/pull/5078#discussion_r2468442636


##########
integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanContractTerminationTest.java:
##########
@@ -118,4 +124,56 @@ public void 
testNegativeLoanContractTerminationInNoProgressiveLoan() {
         });
     }
 
+    @Test
+    public void testLoanContractTerminationSameDisbursementDate() {
+        final PostClientsResponse client = 
clientHelper.createClient(ClientHelper.defaultClientCreationRequest());
+        final GlobalConfigurationHelper globalConfigurationHelper = new 
GlobalConfigurationHelper();
+
+        runAt("1 January 2024", () -> {
+/* 
+            PostLoanProductsResponse loanProductsResponse = 
loanProductHelper.createLoanProduct(create4IProgressive().interestRecognitionOnDisbursementDate(false));
+            Long loanId = applyAndApproveProgressiveLoan(client.getClientId(), 
loanProductsResponse.getResourceId(), "1 January 2024",
+                    500.0, 7.0, 6, (request) -> 
request.interestRecognitionOnDisbursementDate(false));
+
+            disburseLoan(loanId, BigDecimal.valueOf(100), "1 January 2024");
+
+            loanTransactionHelper.moveLoanState(loanId,
+                    new PostLoansLoanIdRequest().note("Contract Termination 
Test").externalId(Utils.randomStringGenerator("", 20)),
+                    "contractTermination");
+
+            verifyTransactions(loanId, //
+                    transaction(100.0, "Disbursement", "01 January 2024"), //
+                    transaction(100.0, "Contract Termination", "01 January 
2024"));
+
+            GetLoansLoanIdResponse loanDetails = 
loanTransactionHelper.getLoanDetails(loanId);
+            assertEquals(BigDecimal.ZERO.stripTrailingZeros(),
+                    
loanDetails.getSummary().getInterestCharged().stripTrailingZeros());
+*/

Review Comment:
   @alberto-art3ch Remove if not needed!



##########
integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanContractTerminationTest.java:
##########
@@ -118,4 +118,25 @@ public void 
testNegativeLoanContractTerminationInNoProgressiveLoan() {
         });
     }
 
+    @Test
+    public void testLoanContractTerminationSameDisbursementDate() {
+        final AtomicReference<Long> loanIdRef = new AtomicReference<>();
+
+        final PostClientsResponse client = 
clientHelper.createClient(ClientHelper.defaultClientCreationRequest());
+
+        final PostLoanProductsResponse loanProductsResponse = 
loanProductHelper.createLoanProduct(create4IProgressive());
+
+        runAt("1 January 2024", () -> {
+            Long loanId = applyAndApproveProgressiveLoan(client.getClientId(), 
loanProductsResponse.getResourceId(), "1 January 2024",
+                    500.0, 7.0, 6, null);
+            loanIdRef.set(loanId);
+
+            disburseLoan(loanId, BigDecimal.valueOf(100), "1 January 2024");
+
+            loanTransactionHelper.moveLoanState(loanId,
+                    new PostLoansLoanIdRequest().note("Contract Termination 
Test").externalId(Utils.randomStringGenerator("", 20)),
+                    "contractTermination");
+        });

Review Comment:
   @alberto-art3ch Have you addressed this?



-- 
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]

Reply via email to