We're developing an entity framework based application which has about 20 different entities, with quite a lot of connections of various types (one-many, many-many etc) between them. Each entity also has on average 10-20 fields that may need concrete values.
We're doing database first, which means the model is generated from the database, it also means that any changes to the database structure forces us to update the model and thus possibly break the application until we can adapt it to the database changes.
Despite these problems, we plan to write interfaces for the context etc, to be able to inject either a real context or a dummy for testing purposes. The interfaces and dummy objects will have to change if the database changes. Is this still a good idea? I don't really see a good alternative.
Our second problem is populating the dummy objects. My best idea so far is to set up all the data in a populator which is called at each test setup, but writing such a populator will take a lot of manual work, especially since I need to set up both the concrete data and create all the relations. What is the best way of doing this?