简体   繁体   中英

How to parse Fixture Arguments into Java code

In my Fitnesse Test page, I'm trying to define a set of variables in the same row as the Fixture class

!|ArgumentsTest|Hello World|Houston We Have a Problem|

However, I'm not clear on how to parse Hello world and Houston We Have a Problem in my Java code.

The Fitnesse documentation that I'm following isn't very clear on how to do this. The SetFixture class doesn't have a doTable(Table arg0) method that takes in a Table object -- only Parse objects.

Has anyone had success doing this on their own?

My Java class is very basic with Settings and Getters. The code works just fine if you use a standard Fitnesse table.

The sample code is indeed incorrect - it should be doTable(Parse table) . But the idea is correct - anywhere in your fixture code, not just in doTable , args[0] will be "Hello World", args[1] will be "Houston We Have a Problem"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM