We already stressed several times the importance of keeping data retrieval separated from business logic. We now turn our attention to the data retrieval component (the repository) and build a fake implementation that we can use in our acceptance tests without having to access databases, files, or web resources.
In order to do so, we create a new subdirs project called repositories, as well as the corresponding repositories.pri file to keep source files separated from test harnesses and other kinds of resources:
# part1-whats_in_my_fridge.proTEMPLATE = subdirsSUBDIRS += \ usecases \ # gui \ entities \ repositories
Once we are done with it, since we'd typically want to have not only a fake repository, but ...