tags:

views:

22

answers:

1

My Fitnesse test does some underlying stuff and populates a Map with the results. The map keys can vary dramatically depending on the test, so I'd like to something like the following:

|parseFile    |getValue("RecordID")|getValue("StatusCode")| ...etc... |
|foo.txt      |      MyId          |   93                 |           |

I could create a getRecordID() method in the Java code, but the keys tend to vary widely (dozens of formats, each with it's own key names...supporting arbitrary customer formats). Can this be done in Fitnesse? I can't figure out how.

+1  A: 

Take a look at DoFixture where you can do something like this:

|myDoFixture|

|parseFile|foo.txt|

|verifyMap|
|key|value|
|RecordId|MyId|
|StatusCode|93|
 ...
Mike Stockdale
It'd work, but be really ugly (vertically very, very long). However, +1 because looking at it led me to CombinationFixture which I think might do what I need.
Chris Kessel