Dependency Injection Refactor Language Collocations
Practise the standard verbs for refactoring toward testable, injected dependencies.
0 / 5 completed
1 / 5
Fill in: 'We ___ hard-coded dependencies with injected ones so components become testable in isolation.'
We 'replace' hard-coded dependencies — the standard collocation for the refactor's core action. The other options aren't idiomatic here.
2 / 5
Fill in: 'We ___ an interface for each dependency so implementations can be swapped freely.'
We 'define' an interface — the standard collocation for specifying a contract. The other options aren't idiomatic here.
3 / 5
Fill in: 'A container that instantiates everything eagerly can ___ startup time significantly.'
We say eager instantiation will 'increase' startup time — the standard collocation for the resulting slowdown. The other options are less idiomatic here.
4 / 5
Fill in: 'We ___ mock implementations into tests through the same injection points used in production.'
We 'wire' mocks in — the standard collocation for connecting a substitute dependency. The other options aren't idiomatic here.
5 / 5
Fill in: 'We ___ the refactor module by module rather than rewriting the whole codebase at once.'
We 'stage' a refactor — the standard collocation for breaking large work into incremental steps. The other options are less idiomatic here.