My web application depends on a web.config entry being a certain value (like FEATURE_ACTIVATED=true) so how do I test the function that reads this web.config entry?
I’d like to avoid copying the web.config entries to an app.config in the unit testing project, as it takes extra effort to synchronize the files.
Pull out the code that reads configuration data, then use dependency injection paired with a mock object, or a mocking framework in your tests.