views:

33

answers:

2

My fitnesse tests fail with linq datacontext. 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(ConfigurationManager.ConnectionStrings["mycon"].ConnectionString, 
         mappingSource
    ) 
{ 
    OnCreated(); 
}

Any ideas? Thanks.

A: 

You could call other constructors, perhaps find a constructor that doesn't hit the config? Or... it's a partial class so you can add a constructor that doesn't hit the config if you don't already have one you like.

David B
A: 

Use the -a option:

http://www.syterra.com/Fit/AppConfigFile.html

There's a bug in the suite config code for app config files - will be fixed in the next release.

Mike Stockdale