FINERACT-2308: fix duplicates for multiple tranches
This commit is contained in:
+2
-14
@@ -202,7 +202,6 @@ public class LoanApplicationApprovalTest {
|
||||
private void trancheLoansApprovalValidation(Integer clientID, Integer loanProductID, List<HashMap> createTranches) {
|
||||
final String proposedAmount = "5000";
|
||||
final String approvalAmount1 = "10000";
|
||||
final String approvalAmount2 = "3000";
|
||||
final String approvalAmount3 = "400";
|
||||
final String approvalAmount4 = "200";
|
||||
|
||||
@@ -213,11 +212,6 @@ public class LoanApplicationApprovalTest {
|
||||
approveTranche1.add(createTrancheDetail("01 March 2014", "5000"));
|
||||
approveTranche1.add(createTrancheDetail("23 March 2014", "5000"));
|
||||
|
||||
List<HashMap> approveTranche2 = new ArrayList<>();
|
||||
approveTranche2.add(createTrancheDetail("01 March 2014", "1000"));
|
||||
approveTranche2.add(createTrancheDetail("23 March 2014", "1000"));
|
||||
approveTranche2.add(createTrancheDetail("23 March 2014", "1000"));
|
||||
|
||||
List<HashMap> approveTranche3 = new ArrayList<>();
|
||||
approveTranche3.add(createTrancheDetail("01 March 2014", "100"));
|
||||
approveTranche3.add(createTrancheDetail("23 March 2014", "100"));
|
||||
@@ -238,15 +232,9 @@ public class LoanApplicationApprovalTest {
|
||||
log.info("-----------------------------------APPROVE LOAN-----------------------------------------------------------");
|
||||
this.loanTransactionHelper = new LoanTransactionHelper(this.requestSpec, this.responseSpecForStatusCode400);
|
||||
|
||||
/* Tranches with same expected disbursement date */
|
||||
List<HashMap<String, Object>> error = this.loanTransactionHelper.approveLoanForTranches(approveDate, expectedDisbursementDate,
|
||||
approvalAmount2, loanID, approveTranche2, CommonConstants.RESPONSE_ERROR);
|
||||
assertEquals("validation.msg.loan.expectedDisbursementDate.disbursement.date.must.be.unique.for.tranches",
|
||||
error.get(0).get(CommonConstants.RESPONSE_ERROR_MESSAGE_CODE));
|
||||
|
||||
/* Sum of tranches is greater than approved amount */
|
||||
error = this.loanTransactionHelper.approveLoanForTranches(approveDate, expectedDisbursementDate, approvalAmount4, loanID,
|
||||
approveTranche4, CommonConstants.RESPONSE_ERROR);
|
||||
List<HashMap<String, Object>> error = this.loanTransactionHelper.approveLoanForTranches(approveDate, expectedDisbursementDate,
|
||||
approvalAmount4, loanID, approveTranche4, CommonConstants.RESPONSE_ERROR);
|
||||
assertEquals("validation.msg.loan.principal.sum.of.multi.disburse.amounts.must.be.equal.to.or.lesser.than.approved.principal",
|
||||
error.get(0).get(CommonConstants.RESPONSE_ERROR_MESSAGE_CODE));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user