Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Config: extract ConfigInit logic #40

Merged
merged 2 commits into from
Jul 10, 2021

Conversation

Chemaclass
Copy link
Member

📚 Description

The current Config class has a lot of responsibilities and it's almost impossible to write isolated tests (unit) for some of its crucial logic. For example, the logic responsible to read different configs by their types.

🔖 Changes

  • Apply extract class refactoring pattern, moving out the logic that initializes the config key-values to another class.
  • ConfigInit depends on abstractions like PathFinderInterface and GacelaJsonConfigFactoryInterface so it can be easily mock in its unit tests.

@Chemaclass Chemaclass added the refactoring Refactoring or cleaning related label Jul 9, 2021
@Chemaclass Chemaclass self-assigned this Jul 9, 2021
@Chemaclass Chemaclass merged commit 7773a0d into master Jul 10, 2021
@Chemaclass Chemaclass deleted the feature/refactor-config branch July 10, 2021 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Refactoring or cleaning related
Development

Successfully merging this pull request may close these issues.

None yet

2 participants