I am trying to extract data (URL) from my configuration file
ie:
<AppSettings> <add key="configurationUrl" value="http://xx.xx.xx.xx:XXXX/configuration service/configurations"/>
using the following code
reqClient.BaseAddress = System.Configuration.ConfigurationManager.AppSettings["configurationUrl"].ToString();
Everything works fine when I try to debug it, but the main problem occurs when I debug the unit test case calling the same code above, instead of showing "configurationUrl" in AllKeys from APPSettings showing "TestProjectRetargetTo35Allowed", I also added the file web.config to the testcase project.
Any help would be appreciated Thanks.
c # unit-testing web-config
Rahul May 7 '14 at 9:03 a.m. 2014-05-07 09:03
source share