3 ms·
Isn't that pretty much always the dilemma with database stuff and testing? On the one hand, you can wrap your DB operations in some kind of mockable interface(
by ragnese 5y ago
Isn't that pretty much always the dilemma with database stuff and testing?
On the one hand, you can wrap your DB operations in some kind of mockable interface(s), and then test your business logic.
On the other hand, you really need to test that the actual SQL ops work anyway- what if you screwed up a foreign key constraint?- that wouldn't show up in your business logic tests or your in-memory SQLite or whatever.