FINERACT-2311: added e2e tests for validation of buy down fees reversal of existing transaction
This commit is contained in:
committed by
Adam Saghy
parent
e46a98065e
commit
59c98b7329
+5
@@ -179,6 +179,11 @@ public final class ErrorMessageHelper {
|
||||
return "Capitalized income transaction cannot be reversed when non-reversed adjustment exists for it.";
|
||||
}
|
||||
|
||||
public static String buyDownFeeUndoFailureAdjustmentExists(Long loanId) {
|
||||
String loanIdStr = String.valueOf(loanId);
|
||||
return String.format("Undo Loan Transaction: %s is not allowed. Loan transaction has not reversed transaction related", loanIdStr);
|
||||
}
|
||||
|
||||
public static String wrongAmountInRepaymentSchedule(int line, BigDecimal actual, BigDecimal expected) {
|
||||
String lineToStr = String.valueOf(line);
|
||||
String actualToStr = actual.toString();
|
||||
|
||||
+7
-1
@@ -538,7 +538,13 @@ public class LoanRepaymentStepDef extends AbstractStepDef {
|
||||
|
||||
Response<PostLoansLoanIdTransactionsResponse> transactionUndoResponse = loanTransactionsApi
|
||||
.adjustLoanTransaction(loanId, targetTransaction.getId(), transactionUndoRequest, "").execute();
|
||||
checkMakeTransactionForbidden(transactionUndoResponse, 403, ErrorMessageHelper.addCapitalizedIncomeUndoFailureAdjustmentExists());
|
||||
if (transactionType.equals("Buy Down Fee")) {
|
||||
checkMakeTransactionForbidden(transactionUndoResponse, 403,
|
||||
ErrorMessageHelper.buyDownFeeUndoFailureAdjustmentExists(targetTransaction.getId()));
|
||||
} else if (transactionType.equals("Capitalized Income")) {
|
||||
checkMakeTransactionForbidden(transactionUndoResponse, 403,
|
||||
ErrorMessageHelper.addCapitalizedIncomeUndoFailureAdjustmentExists());
|
||||
}
|
||||
}
|
||||
|
||||
@When("Customer undo {string}th {string} transaction made on {string} with linked {string} transaction")
|
||||
|
||||
Reference in New Issue
Block a user