Dependency injection
Wiring an object's collaborators from outside it, so a class can be swapped for another implementation without editing the code that uses it.
Overview
No core answer is documented.
There is no container to ship. What the language has for replacing a collaborator is test seams, which swap a block of production code for an injection written in a test class and nowhere else. Swapping it only for the run is the concern of testingUnit testingTesting application logic without a running business process — and the test doubles that make dependencies on the database and on framework services tractable.SAP and community, unassessed, not this capability.
Artifacts
Details
Coverage
For your agent
- Ref
capability:dependency-injection- JSON
- /capabilities/dependency-injection.json
- MCP
- Connecting an agent