1

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.

Mike Stockdale
  • 5,256
  • 3
  • 29
  • 33
Boroda
  • 195
  • 1
  • 7
  • 23

2 Answers2

0

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.

Amy B
  • 108,202
  • 21
  • 135
  • 185
0

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
  • 5,256
  • 3
  • 29
  • 33