开发者

Give an argument to a Fitnesse output method?

开发者 https://www.devze.com 2023-01-20 21:47 出处:网络
My Fitnesse test does some underlying stuff and populates a Map with the results. The map keys can vary drama开发者_如何学JAVAtically depending on the test, so I\'d like to something like the followin

My Fitnesse test does some underlying stuff and populates a Map with the results. The map keys can vary drama开发者_如何学JAVAtically 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.


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

|myDoFixture|

|parseFile|foo.txt|

|verifyMap|
|key|value|
|RecordId|MyId|
|StatusCode|93|
 ...
0

精彩评论

暂无评论...
验证码 换一张
取 消