FINERACT-2354: Third step - backdated re-age edge case for Interest bearing loans - Default Behavior, interestRecalculation = true, without dueDate change

This commit is contained in:
mariiaKraievska
2025-11-13 08:44:22 +01:00
committed by Adam Saghy
parent 01ca515e8f
commit 5a1c6edbef
7 changed files with 438 additions and 141 deletions
@@ -233,8 +233,9 @@ public class LoanReAgingStepDef extends AbstractStepDef {
eventAssertion.assertEventRaised(LoanReAgeEvent.class, loanId);
}
@When("Admin fails to create a Loan re-aging transaction with error {string} and with the following data:")
public void adminFailsToCreateReAgingTransactionWithError(final String expectedError, final DataTable table) throws IOException {
@When("Admin fails to create a Loan re-aging transaction with status code {int} error {string} and with the following data:")
public void adminFailsToCreateReAgingTransactionWithError(final int statusCode, final String expectedError, final DataTable table)
throws IOException {
final Response<PostLoansResponse> loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE);
final long loanId = loanResponse.body().getLoanId();
@@ -259,7 +260,7 @@ public class LoanReAgingStepDef extends AbstractStepDef {
assertThat(errorBody.string()).contains(expectedError);
}
ErrorHelper.checkFailedApiCall(response, 403);
ErrorHelper.checkFailedApiCall(response, statusCode);
}
@Then("Admin fails to create a Loan re-aging transaction with the following data because loan was charged-off:")