How do you unit test a class that's meant to talk to data?
- by Arda Xi
I have a few repository classes that are meant to talk to different kinds of data, deriving from an IRepository interface laid out like so:
In implementations, the code talks to a data source, be this a directory of XML files or a database or even just a cache. Is it possible to reliably unit test any of these implementations? I don't see a mock implementation working, because then I'm only testing the mock code and not the actual code.