Design patterns·The shape of the whole application
the class that touches the framework has no logic in it, so the logic is testable without the framework.
Humble object
Also calledhumble object pattern, thin adapter for testability
Splitting hard-to-test code into a very thin piece that touches the untestable thing and a piece holding all the behaviour. It is the general principle under passive views, thin controllers and hexagonal adapters. It is the most useful single idea for anyone whose tests are slow: find the smallest object that has to touch the boundary and take everything else out of it.