jargon

Design patterns·Wiring: injection, containers and lifetimes

the class constructs its own collaborator inside a method, so testing it means standing up the real thing.

Hard-coded dependency

Also callednewing up, concrete dependency, new is glue

A class that names and constructs a concrete collaborator itself, welding the two together at compile time. It is the thing dependency injection is contrasted against, and the practical symptom is always the same: a unit test that needs a database, a clock or the network. Not every `new` is a problem — constructing a value object or a data structure is fine; constructing something with behaviour, I/O or a lifetime is the case to watch.

Commonly confused with