3 ms·
I see that too - but I also see plenty of completely un-testable code, because the controller constantly reads from AppSettings, or creates a new database conne
by gnud 7y ago
I see that too - but I also see plenty of completely un-testable code, because the controller constantly reads from AppSettings, or creates a new database connection directly, or similar issues.
For small applications, instead of going full on DI, I sometimes just make a few simple public static properties, that I initialize on program startup. Then you can initialize them differently in your test harness. This is a lot easier to understand if you're not an expert in the chosen DI framework or app framework.