Skip to content
Sharp

Service Design · interview question

What is the clearest sign that code around dependency injection should be refactored?

Multiple choiceMediumchapter-13-curatedpremiumservice-designdependency-injection
Choose one answer
Answer and explanation

Correct answer

A. When the rule is no longer easy to trace, explain, or change without breaking nearby behavior.

Why

A refactor is justified when the code stops communicating its intent. Inject repositories and services at boundary seams so tests and reasoning stay local and explicit.

Test yourself on Service Design

A free test with instant, explained results. No account needed.

Start free test
All Service Design questions →