You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2021/10/09 00:52:50 UTC

[GitHub] [fineract] ptuomola commented on a change in pull request #1884: Semi-Monthly Feature (FINERACT-1322)

ptuomola commented on a change in pull request #1884:
URL: https://github.com/apache/fineract/pull/1884#discussion_r725405833



##########
File path: integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanDisbursementDetailsIntegrationTest.java
##########
@@ -211,23 +211,24 @@ private void validateRepaymentScheduleWithEMI(ArrayList<HashMap> periods) {
     private void assertRepaymentScheduleValuesWithEMI(HashMap period, LoanDisbursementTestBuilder expectedRepaymentSchedule, int position) {
 
         assertEquals(period.get("dueDate").toString(), expectedRepaymentSchedule.getDueDate());
-        assertEquals(period.get("principalLoanBalanceOutstanding"), expectedRepaymentSchedule.getPrincipalLoanBalanceOutstanding());
+        assertEquals(Float.parseFloat(period.get("principalLoanBalanceOutstanding").toString()),
+                expectedRepaymentSchedule.getPrincipalLoanBalanceOutstanding(), 0.1f);
         LOG.info("{}", period.get("totalOriginalDueForPeriod").toString());
         assertEquals(Float.parseFloat(period.get("totalOriginalDueForPeriod").toString()),
-                expectedRepaymentSchedule.getTotalOriginalDueForPeriod().floatValue(), 0.0f);
+                expectedRepaymentSchedule.getTotalOriginalDueForPeriod().floatValue(), 0.1f);
 

Review comment:
       Why have these test results changed? I would not expect the existing integration tests to have to change when adding new products... 

##########
File path: fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java
##########
@@ -334,10 +334,10 @@ public CommandProcessingResult submitApplication(final JsonCommand command) {
                 updateProductRelatedDetails(productRelatedDetail, newLoanApplication);
             }
 
-            this.fromApiJsonDeserializer.validateLoanTermAndRepaidEveryValues(newLoanApplication.getTermFrequency(),
-                    newLoanApplication.getTermPeriodFrequencyType(), productRelatedDetail.getNumberOfRepayments(),
-                    productRelatedDetail.getRepayEvery(), productRelatedDetail.getRepaymentPeriodFrequencyType().getValue(),
-                    newLoanApplication);
+            // this.fromApiJsonDeserializer.validateLoanTermAndRepaidEveryValues(newLoanApplication.getTermFrequency(),
+            // newLoanApplication.getTermPeriodFrequencyType(), productRelatedDetail.getNumberOfRepayments(),

Review comment:
       Why is this validation commented out? 




-- 
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-unsubscribe@fineract.apache.org

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