views:

199

answers:

2

I am trying to specify a custom converter to Slim by specifying a suite configuration.

When I manually append ?test (the button doesn't appear for some reason), I get the following exception:

__EXCEPTION__:System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Path\To\fitnesse\__defaultPath__'

Any idea why it would be trying to load "defaultPath" as an assembly from the current working directory?

Below is my suite configuration:

<?xml version="1.0" encoding="utf-8" ?>
<suiteConfig>
  <ApplicationUnderTest>
    <AddAssembly>C:\Path\To\TestsAssembly.dll</AddAssembly>
    <AddNamespace>Tests_Namespace</AddNamespace>
    <AddAssembly>C:\Path\To\fitSharp.dll</AddAssembly>
  </ApplicationUnderTest>

  <fitSharp.Machine.Application.Settings>
    <Runner>fitSharp.Slim.Service.Runner</Runner>
  </fitSharp.Machine.Application.Settings>

  <fitSharp.Slim.Service.Service>
    <AddOperator>NamespaceToConverter.NullableDecimalConverter</AddOperator>
  </fitSharp.Slim.Service.Service>

</suiteConfig>

My Fitnesse wiki page starts like this:

!define TEST_SYSTEM {slim}
!define COMMAND_PATTERN {"%m" -c c:\Path\To\SlimConfig.xml %p}
!define TEST_RUNNER {C:\Path\To\fitsharp\Runner.exe}

|import|
... etc
A: 

I was able to work around the problem by removing the classpath parameter (%p) from COMMAND_PATTERN:

!define COMMAND_PATTERN {%m -c c:\Path\To\SlimConfig.xml}
Richard Szalay
+2  A: 

If you don't have a !path, it defaults to 'defaultPath', so that's what was being passed as the %p parameter. As you discovered, you should remove the %p if you don't have a !path.

Mike Stockdale