3 ms·
Having everything behind an interface is pretty much essential for strict TDD in pure Java 8 (I don't know if or how things have changed for later releases). Of
by User23 4y ago
Having everything behind an interface is pretty much essential for strict TDD in pure Java 8 (I don't know if or how things have changed for later releases). Of course there are a plethora of mock frameworks that will hide the details, but I'm fairly certain under the hood it's dynamically creating an interface. My inclination is to prefer making that explicit rather than relying on magic.