DeathGun44 commented on code in PR #6005:
URL: https://github.com/apache/fineract/pull/6005#discussion_r3448746838


##########
integration-tests/src/test/java/org/apache/fineract/integrationtests/client/feign/FeignLoanTestBase.java:
##########
@@ -337,4 +403,338 @@ protected PostLoansLoanIdTransactionsRequest reAge(String 
startDate, String freq
             Integer numberOfInstallments) {
         return LoanRequestBuilders.reAge(startDate, frequencyType, 
frequencyNumber, numberOfInstallments);
     }
+
+    protected LoanTestData.TransactionExt transaction(double amount, String 
type, String date, double outstandingPrincipal,
+            double principalPortion, double interestPortion, double 
feePortion, double penaltyPortion, double unrecognizedIncomePortion,
+            double overpaymentPortion) {
+        return new LoanTestData.TransactionExt(amount, type, date, 
outstandingPrincipal, principalPortion, interestPortion, feePortion,
+                penaltyPortion, unrecognizedIncomePortion, overpaymentPortion, 
false);
+    }
+
+    protected LoanTestData.TransactionExt transaction(double amount, String 
type, String date, double outstandingPrincipal,
+            double principalPortion, double interestPortion, double 
feePortion, double penaltyPortion, double unrecognizedIncomePortion,
+            double overpaymentPortion, boolean reversed) {
+        return new LoanTestData.TransactionExt(amount, type, date, 
outstandingPrincipal, principalPortion, interestPortion, feePortion,
+                penaltyPortion, unrecognizedIncomePortion, overpaymentPortion, 
reversed);
+    }
+
+    protected LoanTestData.Installment installment(double principalAmount, 
Boolean completed, String dueDate) {
+        return new LoanTestData.Installment(principalAmount, null, null, null, 
null, completed, dueDate, null, null);
+    }
+
+    protected LoanTestData.Installment installment(double principalAmount, 
double interestAmount, double totalOutstandingAmount,
+            Boolean completed, String dueDate) {
+        return new LoanTestData.Installment(principalAmount, interestAmount, 
null, null, totalOutstandingAmount, completed, dueDate, null,
+                null);
+    }
+
+    protected LoanTestData.Installment installment(double principalAmount, 
double interestAmount, double feeAmount,
+            double totalOutstandingAmount, Boolean completed, String dueDate) {
+        return new LoanTestData.Installment(principalAmount, interestAmount, 
feeAmount, null, totalOutstandingAmount, completed, dueDate,
+                null, null);
+    }
+
+    protected LoanTestData.Installment installment(double principalAmount, 
double interestAmount, double feeAmount, double penaltyAmount,
+            double totalOutstandingAmount, Boolean completed, String dueDate) {
+        return new LoanTestData.Installment(principalAmount, interestAmount, 
feeAmount, penaltyAmount, totalOutstandingAmount, completed,
+                dueDate, null, null);
+    }
+
+    protected LoanTestData.Installment installment(double principalAmount, 
double interestAmount, double feeAmount, double penaltyAmount,
+            LoanTestData.OutstandingAmounts outstandingAmounts, Boolean 
completed, String dueDate) {
+        return new LoanTestData.Installment(principalAmount, interestAmount, 
feeAmount, penaltyAmount, null, completed, dueDate,
+                outstandingAmounts, null);
+    }
+
+    protected LoanTestData.Installment installment(double principalAmount, 
double interestAmount, double feeAmount, double penaltyAmount,
+            double totalOutstanding, Boolean completed, String dueDate, double 
loanBalance) {
+        return new LoanTestData.Installment(principalAmount, interestAmount, 
feeAmount, penaltyAmount, totalOutstanding, completed, dueDate,
+                null, loanBalance);
+    }
+
+    protected LoanTestData.OutstandingAmounts outstanding(double principal, 
double interestOutstanding, double fee, double penalty,
+            double total) {
+        return new LoanTestData.OutstandingAmounts(principal, 
interestOutstanding, fee, penalty, total);
+    }
+
+    protected LoanTestData.TransactionExt reversedTransaction(double 
principalAmount, String type, String date) {
+        return new LoanTestData.TransactionExt(principalAmount, type, date, 
null, null, null, null, null, null, null, true);
+    }
+
+    protected LoanTestData.TransactionExt transaction(double amount, String 
type, String date) {
+        return new LoanTestData.TransactionExt(amount, type, date, null, null, 
null, null, null, null, null, false);
+    }
+
+    protected void verifyTransactions(Long loanId, 
LoanTestData.TransactionExt... transactions) {
+        GetLoansLoanIdResponse loanDetails = getLoanDetails(loanId);
+        LoanTestValidators.verifyTransactions(loanDetails, transactions);
+    }
+
+    protected void verifyRepaymentSchedule(Long loanId, 
LoanTestData.Installment... installments) {
+        GetLoansLoanIdResponse loanDetails = getLoanDetails(loanId);
+        LoanTestValidators.verifyRepaymentSchedule(loanDetails, installments);
+    }
+
+    protected PostLoanProductsRequest create4IProgressive() {

Review Comment:
   Done. Moved create4IProgressive() to LoanProductTemplates as a default 
method.



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