I am starting out with unit testing, I have a method that uses the web.config for a connection string.
I was hoping to be able to use
[DeploymentItem("web.config")]
to get the web config file, this still leaves me with null reference exceptions (that'd be what I write my next test for).
How do I use the config file included with the project I am trying to test?
I am using the testing framework included in VS 2008, if that makes any difference.
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…