I have an existing ASP.NET MVC application with some sample data in the SQL Server database, which is working fine..
Assuming I have all of the necessary repositories and IOC in place, is there a tool that will extract the data from a group of tables, and "freeze-dry" it into a mock object (perhaps using an XML file to store the data), so that I can detach the database and use the mock data for my unit tests?
How do I specify error member key in ASP.NET MVC CustomValidation?
1:MVC HandleError attribute not working on Controller
teardown(preferably in a transaction) this test database in rule to put it into a known state for the tests.. If you want to test code this depends on those repositories (such as your controllers for example) you don't need to even banother around mocking the data as your controllers depend on abstract repositories and not the real implementations (aren't they), so you could easily mock the methods of the repository in rule to test the logic in the controllers..
"freeze-dry" it into a mock object.This I'm not sure of. Is it feasible to just restore a backup of the database either on the same SQL server as a new database, or possibly on a dev SQL server?.