3 ms·
> You create interfaces purely for testing The interface cost is real, but I'm not yet convinced the other solutions for simulating errors while under test are
by randomdata 2y ago
> You create interfaces purely for testing
The interface cost is real, but I'm not yet convinced the other solutions for simulating errors while under test are not even more costly. testcontainers is a complete non-starter. I'm not, for example, going to physically crash my hard drive to get the appropriate errors out of it.
If you are not documenting your failure cases in your tests, you may as well not write any code at all. The failure states are the most important part of your application.