Amending Web Config for Test Fixtures

Oct 5, 2010 at 10:04 AM

I'm using CassiniDevLib to host an MVC app for integration testing.

In order to do it I need to amend some config settings on the web server so they match the integration testing environment, first one being the connection string so it points to the test database.

I know I can have two copies of the web.config file and rename them but I was wondering if there was a more elegant way. ie a way to amend the settigns in code as part of the Test Fixture setup.

Would appreciate any thoughts on this.

Coordinator
Oct 5, 2010 at 2:27 PM

adam - there are established procedures for doing precisely this but I don't have any on tap. I guarantee that is you post this question on stackoverflow you will have a slew of answers within an hour.

 

also - regarding the mvc/ninject sample - i haven't forgotten about it. I just caught a contract with a company in London and am pretty focused on getting things rolling there. I will blog a sample within 24 hours I am sure.

 

 

Jun 9, 2011 at 11:30 PM
Edited Jun 9, 2011 at 11:37 PM

I'm interested in this as well, would be nice to either have a link to an SO answer that works well or maybe something in the docs. I am also interesting in the best approach to overriding IoC components as you mentioned above.

Matt