Skip to content

FINERACT-2454: Migrate LoanWithdrawnByApplicantIntegrationTest from RestAssured to feign client#5668

Open
Dpk376 wants to merge 1 commit intoapache:developfrom
Dpk376:feature/FINERACT-2454-migrate-loan-withdrawn-test
Open

FINERACT-2454: Migrate LoanWithdrawnByApplicantIntegrationTest from RestAssured to feign client#5668
Dpk376 wants to merge 1 commit intoapache:developfrom
Dpk376:feature/FINERACT-2454-migrate-loan-withdrawn-test

Conversation

@Dpk376
Copy link
Copy Markdown
Contributor

@Dpk376 Dpk376 commented Mar 21, 2026

Description

Closes/relates to FINERACT-2454

Migrates LoanWithdrawnByApplicantIntegrationTest from RestAssured to the type-safe feign client, as part of the ongoing test migration effort.

Changes

  • Replaced RequestSpecification/ResponseSpecification boilerplate with extends BaseLoanIntegrationTest
  • Removed @BeforeEach setup — lifecycle managed by BaseLoanIntegrationTest
  • Replaced ClientHelper.createClient(requestSpec, responseSpec, ...)ClientHelper.createClient(PostClientsRequest)
  • Replaced LoanProductTestBuildercreateOnePeriod30DaysLongNoInterestPeriodicAccrualProduct()
  • Replaced LoanApplicationTestBuilder + CollateralManagementHelper (no feign equivalent) → applyLoan(applyLoanRequest(...))
  • Replaced LoanStatusChecker HashMap-based assertions → verifyLoanStatus(loanId, LoanStatus.*)
  • Replaced withdrawLoanApplicationByClient()withdrawnByApplicantLoan(externalId, PostLoansLoanIdRequest)

Result

102 lines → 60 lines. Zero RestAssured imports remaining.

No behavioral changes — the test still verifies that a pending loan application can be withdrawn by the applicant and transitions to WITHDRAWN_BY_CLIENT status.

Copy link
Copy Markdown
Contributor

@Saifulhuq01 Saifulhuq01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check a point cmds

@Dpk376 Dpk376 force-pushed the feature/FINERACT-2454-migrate-loan-withdrawn-test branch from d99bb19 to d79bf72 Compare March 24, 2026 12:04
@adamsaghy
Copy link
Copy Markdown
Contributor

Please run:
./gradlew spotlessApply spotbugsMain spotbugsTest checkstyleMain checkstyleTest
./gradlew --no-daemon build -x test -x cucumber -x doc

Before any PR or changes, please always run these two commands and make sure there is green build!

@Dpk376 Dpk376 force-pushed the feature/FINERACT-2454-migrate-loan-withdrawn-test branch 2 times, most recently from f511034 to d0ae703 Compare March 27, 2026 16:59
@Dpk376 Dpk376 requested a review from Saifulhuq01 March 27, 2026 17:00
@Dpk376
Copy link
Copy Markdown
Contributor Author

Dpk376 commented Mar 29, 2026

Please run: ./gradlew spotlessApply spotbugsMain spotbugsTest checkstyleMain checkstyleTest ./gradlew --no-daemon build -x test -x cucumber -x doc

Before any PR or changes, please always run these two commands and make sure there is green build!

Yes its been done Adam

@Dpk376
Copy link
Copy Markdown
Contributor Author

Dpk376 commented Mar 29, 2026

please check a point cmds

Thats been taken care of Saifulhuq01

@Dpk376 Dpk376 force-pushed the feature/FINERACT-2454-migrate-loan-withdrawn-test branch 2 times, most recently from f1dc5b5 to 873ffe5 Compare March 30, 2026 15:31
@adamsaghy
Copy link
Copy Markdown
Contributor

@Dpk376 Please rebase.

@Dpk376 Dpk376 force-pushed the feature/FINERACT-2454-migrate-loan-withdrawn-test branch 2 times, most recently from b01b482 to 22f6905 Compare April 2, 2026 15:48
@Dpk376
Copy link
Copy Markdown
Contributor Author

Dpk376 commented Apr 2, 2026

@Dpk376 Please rebase.

The rebase is done @adamsaghy

@Dpk376 Dpk376 force-pushed the feature/FINERACT-2454-migrate-loan-withdrawn-test branch from 22f6905 to d861d76 Compare April 3, 2026 01:57
…estAssured to fineract-client-feign

- Migrates LoanWithdrawnByApplicantIntegrationTest to use fineract-client-feign
- Replaces RestAssured based API calls with Feign client
- Fixes getObligeeData handling for JSON array response
- Applies related test and schema updates

# Conflicts:
#	integration-tests/src/test/java/org/apache/fineract/integrationtests/ClientExternalIdTest.java
#	integration-tests/src/test/java/org/apache/fineract/integrationtests/common/ClientHelper.java
@Dpk376 Dpk376 force-pushed the feature/FINERACT-2454-migrate-loan-withdrawn-test branch from d861d76 to 1934cad Compare April 3, 2026 14:32
@Dpk376
Copy link
Copy Markdown
Contributor Author

Dpk376 commented Apr 3, 2026

Hi @adamsaghy

This PR is ready to merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants