FINERACT-2790: Re-amortization- Interest handling-Equal Overdue Interest Split - E2E tests

This commit is contained in:
Peter Kovacs
2025-12-12 20:02:06 +01:00
committed by Arnold Gálovics
parent 8e34003be9
commit a229a55c49
2 changed files with 434 additions and 18 deletions
@@ -70,6 +70,19 @@ public class LoanReAmortizationStepDef extends AbstractStepDef {
testContext().set(TestContextKey.LOAN_REAMORTIZATION_RESPONSE, response);
}
@When("Admin creates a Loan re-amortization transaction on current business date with reAmortizationInterestHandling {string}")
public void createLoanReAmortizationWithInterestHandling(String reAmortizationInterestHandling) throws IOException {
Response<PostLoansResponse> loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE);
long loanId = loanResponse.body().getLoanId();
PostLoansLoanIdTransactionsRequest reAmortizationRequest = LoanRequestFactory.defaultLoanReAmortizationRequest().reAmortizationInterestHandling(reAmortizationInterestHandling);
Response<PostLoansLoanIdTransactionsResponse> response = loanTransactionsApi
.executeLoanTransaction(loanId, reAmortizationRequest, "reAmortize").execute();
ErrorHelper.checkSuccessfulApiCall(response);
testContext().set(TestContextKey.LOAN_REAMORTIZATION_RESPONSE, response);
}
@When("When Admin creates a Loan re-amortization transaction on current business date by loan external ID")
public void createLoanReAmortizationByLoanExternalId() {
PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE);