views:

28

answers:

2

I wrote a query that gets a list of objects using linq. The code executes fine in the project, but fails when I try to access it from the fitnesse project. base(global::System.Configuration.ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString, mappingSource) I guess it has something to do with the connection string, but I don't know how to specify the connection string separately for the fitnesse project. Both project and fitnesse project are part of the same solution. Any ideas? Thanks, Jenny

A: 

You need to specify where to find the app config file:

http://www.syterra.com/Slim/AppConfigFiles.html

Mike Stockdale
A: 

Thanks, I already tried adding a suite.config and then app config to my c:\fitnesse folder - where the .jar file is.

I added -c option c:\Fitnesse\suite.config to the command section on the test page. Here's the suite.config file: c:\fitnesse\myapp.config ^.svn$

Here's the myapp.config file:

The test still fails here:

public MyDataContext() : base(global::System.Configuration.ConfigurationManager.ConnectionStrings["mycon"].ConnectionString, mappingSource) { OnCreated(); }

Boroda