Skip to content

Use factory methods instead of bulky constructors. #1

Description

When dependencies are injected via the constructor, it can result in bulky constructor arguments. Factory methods enable us to replace specific dependencies with mocks or stubs during testing without modifying the constructor. This approach is particularly useful for tightly coupled components or when dependencies are created internally.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions