FINERACT-2326: Loan contract termination same disbursement date - E2E

This commit is contained in:
Peter Kovacs
2025-11-13 12:47:46 +01:00
committed by Adam Saghy
parent a0b31bbb25
commit 1b3217be39
3 changed files with 17 additions and 2 deletions
@@ -5341,6 +5341,20 @@ public class LoanStepDef extends AbstractStepDef {
.isEqualTo(transactionId);
}
@And("Admin successfully terminates loan contract - no event check")
public void makeLoanContractTerminationNoEventCheck() throws IOException {
final Response<PostLoansResponse> loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE);
assert loanResponse.body() != null;
final long loanId = loanResponse.body().getLoanId();
final PostLoansLoanIdRequest contractTerminationRequest = LoanRequestFactory.defaultLoanContractTerminationRequest();
final Response<PostLoansLoanIdResponse> loanContractTerminationResponse = loansApi
.stateTransitions(loanId, contractTerminationRequest, "contractTermination").execute();
testContext().set(TestContextKey.LOAN_CONTRACT_TERMINATION_RESPONSE, loanContractTerminationResponse);
ErrorHelper.checkSuccessfulApiCall(loanContractTerminationResponse);
}
@And("Admin successfully undoes loan contract termination")
public void undoLoanContractTermination() throws IOException {
final Response<PostLoansResponse> loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE);