Search code examples
.netfitnessefitsharpdbfit

Dbfit standalone mode in Fitnesse.NET/fitsharp not working for me


In attempting to upgrade to the latest Fitnesse/fitSharp release for .NET I find that my database actions, written in standalone mode, now fail uniformly. This worked fine with my older Fitnesse installation (without fitSharp). This attempt to connect to a database:

!|import      |
|dbfit.fixture|

!|DatabaseEnvironment|sqlserver|
|Connect|Data Source=DevDB1;Initial Catalog=TestDB;Integrated Security=SSPI|

generates this error:

fitSharp.Machine.Exception.TypeMissingException: Type 'SqlServerEnvironment' not found in assemblies:
<assemblies listed here>. . .

The list of searched assemblies includes dbfit.DLL, dbfit.Oracle.DLL, and dbfit.SqlServer.DLL, and .NET Reflector confirms that 'SqlServerEnvironment' is in fact in the dbfit.DLL file.

If I change from standalone mode to flow mode, with the following test table as the first table in the test, then the DB connection works fine:

!|dbfit.SqlServerTest                                                      |
|Connect|Data Source=DevDB1;Initial Catalog=TestDB;Integrated Security=SSPI|

Version info:

  • Fitnesse.jar is version 20110104
  • fitSharp is version 1.8 for .net 4.0
  • OS: WinXP Pro SP3

Am I missing something or is this a known defect in the latest version of fitSharp?


Solution

  • This is a known bug. Should be fixed in the next release.