Many times it is necessary to be able to test each layer of an application individually. This task becomes specially difficult with the data access code and the unit tests since is complex to assure the results of the tests if each developer doesn’t have a private database.
To solve this problem I have developed a ADO.NET Data Provider that allows to test the data access code without accessing to the database.
The Mock Data Provider has two operation modes:
In the “recording” mode it acts of Proxy against another ADO.NET Data Provider and it records the results of all the executions against the database.
In the “mock” mode it returns the results that it registered previously in the “recording” mode, without being connected to the database.