NUnit System.ArgumentException (w/ Entity Framework)

 

Entity Framework ile veritabanı işlemlerinizi yaptığınız projelerinizi NUnit ile test etmeye kalktığınızda aşağıdaki gibi bir hata alacaksınız.

System.ArgumentException: The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.

Bu hatadan kurtulmak için bağlantı bilgilerinizin yer aldığı App.config dosyasını NUnit projeniz ile aynı yere kopyalayıp ismini NUnitProjenizinIsmi.config şekilde değiştirmeniz yeterli.