josehernandezfintecheandomx commented on code in PR #2788:
URL: https://github.com/apache/fineract/pull/2788#discussion_r1041003032


##########
integration-tests/src/test/java/org/apache/fineract/integrationtests/DelinquencyAndChargebackIntegrationTest.java:
##########
@@ -281,6 +285,26 @@ public void 
testLoanClassificationStepAsPartOfCOBRepeated() {
         getLoansLoanIdResponse = loanTransactionHelper.getLoan(requestSpec, 
responseSpec, loanId);
         validateLoanAccount(getLoansLoanIdResponse, amountVal, "400.00", 7, 
Double.valueOf("400.00"));
 
+        // Pay the Loan to get this as Closed
+        loanIdTransactionsResponse = 
loanTransactionHelper.makeLoanRepayment(operationDate, transactionAmount, 
loanId);
+        assertNotNull(loanIdTransactionsResponse);
+        getLoansLoanIdResponse = loanTransactionHelper.getLoan(requestSpec, 
responseSpec, loanId);
+        assertEquals(LoanStatus.CLOSED_OBLIGATIONS_MET.getValue(), 
getLoansLoanIdResponse.getStatus().getId());
+        log.info("Loan id {} with status {}", loanId, 
getLoansLoanIdResponse.getStatus().getCode());
+
+        // Evaluate Installments
+        GetLoansLoanIdRepaymentSchedule getLoanRepaymentSchedule = 
getLoansLoanIdResponse.getRepaymentSchedule();
+        if (getLoanRepaymentSchedule != null) {
+            log.info("Loan with {} periods", 
getLoanRepaymentSchedule.getPeriods().size());
+            for (GetLoansLoanIdRepaymentPeriod period : 
getLoanRepaymentSchedule.getPeriods()) {
+                if (period.getPeriod() != null) {
+                    log.info("Period number {} completed on date {}", 
period.getPeriod(), period.getObligationsMetOnDate());
+                    assertNotNull(period.getObligationsMetOnDate());

Review Comment:
   The result gets all the periods and It includes the first period 
(disbursement) and this period has not due date, obligations date, period 
number, etc



##########
integration-tests/src/test/java/org/apache/fineract/integrationtests/DelinquencyAndChargebackIntegrationTest.java:
##########
@@ -281,6 +285,26 @@ public void 
testLoanClassificationStepAsPartOfCOBRepeated() {
         getLoansLoanIdResponse = loanTransactionHelper.getLoan(requestSpec, 
responseSpec, loanId);
         validateLoanAccount(getLoansLoanIdResponse, amountVal, "400.00", 7, 
Double.valueOf("400.00"));
 
+        // Pay the Loan to get this as Closed
+        loanIdTransactionsResponse = 
loanTransactionHelper.makeLoanRepayment(operationDate, transactionAmount, 
loanId);
+        assertNotNull(loanIdTransactionsResponse);
+        getLoansLoanIdResponse = loanTransactionHelper.getLoan(requestSpec, 
responseSpec, loanId);
+        assertEquals(LoanStatus.CLOSED_OBLIGATIONS_MET.getValue(), 
getLoansLoanIdResponse.getStatus().getId());
+        log.info("Loan id {} with status {}", loanId, 
getLoansLoanIdResponse.getStatus().getCode());
+
+        // Evaluate Installments
+        GetLoansLoanIdRepaymentSchedule getLoanRepaymentSchedule = 
getLoansLoanIdResponse.getRepaymentSchedule();
+        if (getLoanRepaymentSchedule != null) {
+            log.info("Loan with {} periods", 
getLoanRepaymentSchedule.getPeriods().size());
+            for (GetLoansLoanIdRepaymentPeriod period : 
getLoanRepaymentSchedule.getPeriods()) {
+                if (period.getPeriod() != null) {
+                    log.info("Period number {} completed on date {}", 
period.getPeriod(), period.getObligationsMetOnDate());
+                    assertNotNull(period.getObligationsMetOnDate());

Review Comment:
   Done



-- 
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: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to