The concepts of unit test and integration test clearly defined: the former checks one component, the latter tests more than one component.
I use Effort to test Entity Framework repositories. The effort is the implementation of the database in memory, so we do not encounter the actual database, but simply the memory, therefore it is faster.
I only test my repositories by creating some fake data and populating the database in memory with that fake data. I am not mocking the data context. Should they be considered unit tests or integration tests?
Change I am testing the methods of my repositories - for example. CustomerRepository.GetAllCustomers. I populate this database with (say) 5 clients in memory by calling a method and claim that I am returning these 5 clients.
source share