FINERACT-2454: Migrate ClientLoanAccountLockIntegrationTest from RestAssured to feign client#5670
Open
Dpk376 wants to merge 5 commits intoapache:developfrom
Open
Conversation
…estAssured to feign client
…rn array response Corrected the @apiresponse annotation in ClientsApiResource for both clientId and externalId obligee endpoints to use @ArraySchema, reflecting the actual JSON array response returned by the server. Promoted GetObligeeData to a top-level swagger schema class and removed the GetClientObligeeDetailsResponse wrapper class that was incorrectly describing the response as an object. Updated ClientHelper.getObligeeData() to use the now-correct feign client method, removing the RestAssured workaround.
…Assured to feign client
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Relates to FINERACT-2454
Migrates
ClientLoanAccountLockIntegrationTestfrom RestAssured to the type-safe feign client.Changes
RequestSpecification/ResponseSpecificationboilerplate withextends BaseLoanIntegrationTest@BeforeEachsetup,clientHelper,loanTransactionHelper,loanAccountLockHelperinstance fieldsClientHelper.createClient(requestSpec, responseSpec)→ClientHelper.addClientAsPerson()LoanProductTestBuilder+getLoanProductId()→createLoanProduct(createOnePeriod30DaysLongNoInterestPeriodicAccrualProduct())LoanApplicationTestBuilder+getLoanId()→applyLoan(applyLoanRequest(...))approveLoan(String, Integer)→approveLoan(Long, PostLoansLoanIdRequest)disburseLoanWithNetDisbursalAmount()→disburseLoan(Long, String, Double)LoanStatusCheckerHashMap assertions →verifyLoanStatus(loanId, LoanStatus.*)LoanAccountLockHelper.placeSoftLockOnLoanAccount()(RestAssured) →FineractClientHelper.getFineractClient().legacy.placeLockOnLoanAccount()(feign)clientHelper.retrieveLockedAccounts()instance call →FineractClientHelper.getFineractClient().loanAccountLockApi.retrieveLockedAccounts()(feign)Result
134 lines → 65 lines. Zero RestAssured imports remaining.
No behavioral changes — the test still verifies that a soft-locked loan account appears in the locked accounts list.