Using NUnit for testing purposes

Aglaia avatar
LLBLGen Pro Team
Posts: 535
Joined: 07-Sep-2003
# Posted on: 21-Aug-2007 13:19:34   

Question: I want to unit test the generated code together with my code using NUnit. However it doesn't work, NUnit can't connect to the database, how come?

Solution: If you want to use NUnit for testing purposes, you have to create an app.dll.config file (where app is the name of the project created for NUnit testing) and place it in the bin\debug directory for the NUnit project. For example if you create a new project called "UnitTest" for NUnit testing, and after adding the appropriate references (see LLBLGen Pro and NUnit documentation) you must copy the App.config file that LLBLGen Pro creates to the directory where the NUnit test dll resides (bin\debug) and rename it to "UnitTest.dll.config".