When to use a protocol
We can use an interface (protocol) for many different reasons - being able to swap out the concrete object used for a mock is one of them - it allows us to isolate the unit being tested;
eg for a VM that uses a bunch of services we don't want to tes...
coderlyn.hashnode.dev1 min read