Dave wrote:
Tiny Forum lost my original post. Bad Tiny... Bad, Bad, Bad
hmmm. you got an error or something?
I am doing some Unit Testing with NUnit for the first time against a database using LLBLGen Pro. It is a web application in development local to my PC.
When I open the test assembly from the bin directory of my web application and run a simple test involving LLBLGen Pro I get the error:
'ConnectionString' cannot be found...
ConnectionString is in the web.config of the web application root folder, but that probably doesn't do me much good during the test
How do I get LLBLGen Pro to use a connection string during NUnit Testing? I am not sure how this unit testing stuff works when you need information from an app.config or web.config file?
Thanks.
The FAQ on the website has an item for this
I'll quote it here:
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?
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".
I use unittesting for a month now or so with my new developments with llblgen pro and had to use this same info to get it running
.