Unit testing programmatic web.config edits
So on one hand, you've got...
System.Configuration.Configuration config = System.Web.Configuration.WebConfigurationManager.
OpenWebConfiguration(HttpRuntime.AppDomainAppVirtualPath);
in your configuration editing junk. Works like a champ when you call Save() on that object. The problem is that HttpRuntime.AppDomainAppVirtualPath has no value in a unit test. The weird thing though is that you can call the above code from the test and call it's Save() and it throws no errors. It sure thinks it's saving some config data somewhere, but I can't figure out where.
I know I'm being nutty here, but I really want to be able to test this stuff. Any suggestions?
EDIT: Actually, the test is manipulating web.config in the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG folder. That's odd.