NUnit 2.2.9 and .NET 2.0 Configuration

R

Rastko Soskic

Hi everyone! :)

I have project containing test cases and I've added
<assemblyname.dll.config> configuration file to [bin\debug] output directory
of project.(That way, NUnit has been working with .net 1.x projects )
However, ConfigurationManager in .net 2.0 doesn't even see configuration
file wherever I put it. What should I do?

Any help is appreciated, and thanks in advance :)

p.s. If it can help, here is sample of code (as simple as possible):
First test case:
[Test]
public void CanRetrieveConnString()
{
connStr = ConfigurationManager.ConnectionStrings["ConnStr"];
Assert.IsNotNull(connStr);
}
and here is part of config file:
<configuration>

<connectionStrings>

<add name="ConnString" connectionString="Value which I can't retrieve from
unit test case :)" />

</connectionStrings>

</configuration>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top