Erwin Pombett
asked on
how can i set App.Config values while testing with nunit?
how can i set values in order to test my code.
public Hashtable MyMethod()
{
string _pathFTP = ConfigurationSettings.AppS ettings["F TP_HOST_FE EDING_CONT AINER"];
string _user = ConfigurationSettings.AppS ettings["F TP_USER"];
string _pass = ConfigurationSettings.AppS ettings["F TP_PASS"];
...
}
now , i'd like to test this with Nunit,
i have a test method as follow.
[Test]
public void testing MyMethod(){
<---- how can i set my ftp values, as they are not existent in my method process while testing
assert(...);
}
the aim is not to change my method code,
public Hashtable MyMethod()
{
string _pathFTP = ConfigurationSettings.AppS
string _user = ConfigurationSettings.AppS
string _pass = ConfigurationSettings.AppS
...
}
now , i'd like to test this with Nunit,
i have a test method as follow.
[Test]
public void testing MyMethod(){
<---- how can i set my ftp values, as they are not existent in my method process while testing
assert(...);
}
the aim is not to change my method code,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.