1

I'm new to C#; I'm trying to get fitSharp working with a fixture which always returns a hard-coded string ("hi"). Pretty much no matter what I do, I get "Could not find class fixture.FitNesseDemoFixture".

I'm developing with Xamarin community edition, and running Java 1.6. and Mono.

I've copied the fixture DLL into the same directory as the fitSharp.dll and fit.dll files; this is also the directory from which I start the FitNesse server. I've verified my fixture class is exported in the .dll. Here's the fixture code:

using System;
using fit;

namespace fixture
{
    public class FitNessDemoFixture : ColumnFixture {
        public String result() {
            return "hi";
        }
    }
}

... and here's the test page source code ...

!contents -R2 -g -p -f -h

!define TEST_SYSTEM {slim}
!define COMMAND_PATTERN {%m -r fitSharp.Slim.Service.Runner,fitSharp.dll %p}
!define TEST_RUNNER {C:\bin\FitNesse\Runner.exe}

!1 Define path

!path FitNesseDemo.dll

!1 Define test

|fixture.FitNesseDemoFixture|
|result?|
|hi|

Any ideas on what I'm doing wrong?

Jerry Andrews
  • 847
  • 5
  • 23
  • There's a screen shot of the failed test page at http://www.jrandrews.com/fitsharpFailure.png – Jerry Andrews Sep 14 '13 at 00:12
  • Is this bug report relevant? http://fitnesse.996250.n3.nabble.com/fitSharp-namespace-issues-TypeMissingException-for-fixture-name-td11201.html Its kind of old, but who knows...? – Vegar Sep 16 '13 at 12:57
  • Hum.. Maybe not... https://github.com/jediwhale/fitsharp/issues/63 – Vegar Sep 16 '13 at 13:00
  • I tried an import block, but that didn't work, either. – Jerry Andrews Sep 16 '13 at 20:42
  • ...and it had the funny result of the following error message in the header of the table (where the classname is located): FitNesseDemoFixture[?] Could not find class FitNesseDemoFixtureATitleCreatePageHrefFitNesseDemoFixtureEditNonExistentTrueA – Jerry Andrews Sep 16 '13 at 20:53

1 Answers1

1

You can't use ColumnFixture with the Slim test system. See http://www.fitnesse.org/FitNesse.UserGuide.TestSystems and http://fitsharp.github.io/Slim.html and http://fitsharp.github.io/Fit.html

Mike Stockdale
  • 5,256
  • 3
  • 29
  • 33
  • Excellent! Thank you! (But Slim is still reporting as shown at http://jrandrews.com/fitsharpFailure.png. It isn't finding the fixture class at all.) – Jerry Andrews Sep 17 '13 at 19:52
  • The funny error is because FitNesseDemoFixture is a wiki word and gets rendered as a non-existent page link. Use a literal table like !|fixture.FitNesseDemoFixture| etc. – Mike Stockdale Sep 24 '13 at 03:15
  • Thanks, Mike--that comment was the final piece of the puzzle. – Jerry Andrews Nov 25 '13 at 21:08