On Jul 23, 2020, at 12:17, Garrett Fitzgerald sarekofvulcan@gmail.com wrote:
I still have trouble conceptualizing how to write unit tests for data access.
That’s good, because once you exercise anything outside of the “unit”, it’s no longer a unit test.
What you generally do is mock the database call, returning what the DB *should* return. This way you’re testing your code, not the DB connection.
If you want to test against a live system, you need to run functional tests.
-- Ed Leafe