I'm working my way through the eBook Test Driven .NET Development with FitNesse (PDF) and I've run into a problem creating a test page using flow mode with a DoFixture (Chapter 8 Coordinating fixtures). Following through the tutorial in the chapter you create a test page using flow mode then refactor it to move the setup, including the first two tables, into a separate SetUp page (the refactoring starts on page 99 of the book).
I was able to create the initial flow mode test page successfully but I can't get the refactored version working, with the separate SetUp page. I figure I'm missing something obvious but I can't see it.
Here is the contents of SettlementTests.SetUp:
!define COMMAND_PATTERN {%m -r fitnesse.fitserver.FitServer %p}
!define TEST_RUNNER {FitSharp\Runner.exe}
!path C:\...\Tristan.Test.dll
!|Tristan.Test.SettlementTest|
|Accounts before the draw|
|player|balance|
|Arthur|100|
|Ford|100|
|Trisha|100|
|Marvin|100|
And this is the SettlementTests.OneWinnerSixBallsFirstTry page:
|Tickets in the Draw|
|player|numbers|value|
|Ford|2,11,22,33,39,18|50|
|Arthur|1,5,4,7,9,20|50|
|Trisha|10,21,30,6,16,26|50|
|Marvin|12,13,14,15,16,17|50|
|Draw results are|1,5,4,20,9,7|
|Accounts after the Draw|
|Player|Balance?|
|Arthur|118|
|Ford|50|
|Trisha|50|
|Marvin|50|
For each table I'm getting the error message:
Could not find fixture: Tristan.Test.SettlementTest.
(or whatever the fixture name specified in the table is)
I've created a parent SettlementTests suite page, and tried setting the SetUp page as both a Static page and as a Test page. I get the same results in both cases. The classpath is the same as the all-in-one page that works.
Is there something special I need to do to get flow mode working when I define the enclosing table in the SetUp page?
Move the !define and !path lines out of the SetUp page and onto the parent page.