views:

18

answers:

1

I need to test a class library project in VS. This project, itself, does not have a web.config file, but the classes do on the web server to which it's deployed. I access these like this:

ConfigurationManager.ConnectionStrings["stringname"].ConnectionString;

Can I adjust these strings while running unit tests in VS? Should I have considered a different design method to avoid this problem?

+1  A: 

You can put the configuration into the app.config of the unit test project.

John Saunders
figured it was easy--just didn't know what to call it. thanks
David