Skip to content

FINERACT-1474: Remove hard-coded constants from ExternalCreditBureauTest#5636

Open
debcodes076 wants to merge 1 commit intoapache:developfrom
debcodes076:fix-issue-1474-hardcoded-constants
Open

FINERACT-1474: Remove hard-coded constants from ExternalCreditBureauTest#5636
debcodes076 wants to merge 1 commit intoapache:developfrom
debcodes076:fix-issue-1474-hardcoded-constants

Conversation

@debcodes076
Copy link

@debcodes076 debcodes076 commented Mar 16, 2026

Description

This PR addresses Issue 1474 by refactoring the ExternalCreditBureauIntegrationWritePlatformServiceImplTest.java file and its implementation to remove hard-coded strings and magic numbers.

Changes Made

  • Renamed the service and test classes to be vendor-neutral (e.g., ExternalCreditBureau...).
  • Introduced private static final constants for CREDIT_BUREAU_ID, TEST_USERNAME, TEST_PASSWORD, and TEST_URL.
  • Updated the setup() method and all @Test cases to utilize these constants.
  • Verified that the refactor does not break functionality by running the local test suite.

Verification

  • Ran the test command: ./gradlew :fineract-provider:test --tests "org.apache.fineract.infrastructure.creditbureau.service.ExternalCreditBureauIntegrationWritePlatformServiceImplTest"
  • Result: BUILD SUCCESSFUL

Checklist

  • Write the commit message as per guidelines
  • Acknowledge that the build passes locally
  • Follow coding conventions

This is my first contribution to Apache Fineract as part of my GSoC 2026 preparation.

@debcodes076 debcodes076 force-pushed the fix-issue-1474-hardcoded-constants branch from 55b4100 to 6414dbe Compare March 16, 2026 18:12
Copy link
Contributor

@IOhacker IOhacker left a comment

Choose a reason for hiding this comment

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

Hello, "ThitsaWorks" seems to be non neutral, it must be removed or replaced.

@debcodes076 debcodes076 force-pushed the fix-issue-1474-hardcoded-constants branch from 6414dbe to ea97caa Compare March 16, 2026 19:14
@debcodes076 debcodes076 changed the title FINERACT-1474: Remove hard-coded constants from ThitsaWorksCreditBureauTest FINERACT-1474: Remove hard-coded constants from ExternalCreditBureauTest Mar 17, 2026
@debcodes076 debcodes076 force-pushed the fix-issue-1474-hardcoded-constants branch from ea97caa to 961609c Compare March 17, 2026 09:06
@debcodes076
Copy link
Author

debcodes076 commented Mar 17, 2026

Hello, "ThitsaWorks" seems to be non neutral, it must be removed or replaced.

thank you for the feedback! i've refactored the code to replace all "Thitsaworks.." references with "ExternalCredit..." (including file name, classnames, method names) to ensure vendor neutrality.

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.

2 participants