In .Net, to rollback transactions after unit tests run, you can use Enterprise Services.
For more information, you can follow the link: http://weblogs.asp.net/rosherove/articles/dbunittesting.aspx
In .Net, to rollback transactions after unit tests run, you can use Enterprise Services.
For more information, you can follow the link: http://weblogs.asp.net/rosherove/articles/dbunittesting.aspx
Uygulamanız .config dosyası içeriyorsa ve NUnitle test yazmışsanız konfigürasyon işini testlerinize de bildirmelisiniz. Bunun için .config dosyasını test altına kopyalayın ve
Ve bu işin çalışıp çalışmadığını da test etmek için test projesi .config dosyasına;
<add key=”testKey” value=”I am a test key”/>
ekleyin.
Ve test olarak şunu yazın:
[Test]
public void CheckConfigFile()
{
Assert.AreEqual( “I am a test key”, System.Configuration.ConfigurationSettings.AppSettings["testKey"] );
}
Başınız ağrısınız, testleriniz yeşil, kodunuz temiz olsun…
Kaynak : How NUnit Finds Config Files http://nunit.com/blogs/?p=9#respond