A third provider signs
transcript
Monday. The business signs a third payment provider. Counts in cents, this time. How many files do you open? And how many tests?
Without adapters, you add a branch to pay. And another to refund. Two methods, edited. Then one more branch, in every method you add later. With adapters, it's one new class. Nothing else opens.
The checkout talks to one gateway interface. Only that. Alpha and Beta already implement it. Gamma, the new vendor, does too. In cents, if it likes. It brings its own units and its own errors. The adapter absorbs both. The checkout wasn't touched. Neither were the old adapters.
Nothing else is edited. Not the checkout. Not the two old adapters. And every old test still passes, unchanged.
A new vendor is a new class. That's the whole payoff. One class, one contract test. Never an edit to the checkout.
Full breakdown in the lecture.