Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Decouple Dependencies to Improve Testability and Reduce Tight Coupling #3

Copy link
Copy link
@UnnikrishnanBhargavakurup

Description

Dependencies need to be decoupled. Since most of our dependencies are not injected through constructors, the code has tight coupling and is not testable. We can adopt a hybrid approach: if the dependency is not provided through the constructor, create it using a private factory method. This way, we can avoid bloated constructors while achieving highly testable code.

Reactions are currently unavailable

Metadata

Metadata

Labels

enhancementNew feature or requestNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.