Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Is it possible to pass entire table as arrayList to fixture code? #1306

Open
BigInspector opened this issue Nov 11, 2020 · 1 comment

Comments

@BigInspector
Copy link

BigInspector commented Nov 11, 2020

Hello. I am using Fitnesse Slim and I have the following table (I am newbie to Fitnesse):

|payment_date|amount |
|2020-01-20 |-3987.55|
|2020-02-20 |520.82 |
|2020-03-20 |520.82 |
|2020-04-20 |520.82 |
|2020-05-20 |520.82 |
|2020-06-20 |520.82 |
|2020-07-20 |520.82 |
|2020-08-20 |520.82 |
|2020-09-20 |520.82 |

Basically what I need is to pass the entire table as list to fixture code and then calculate one value based on dates and amount. How this can be implemented?

@fhoeben
Copy link
Collaborator

fhoeben commented Nov 11, 2020

You could use a Table Table in combination with your own fixture to get the entire table as list of lists and calculate what you need.
But... where does the expected value go (i.e. the value to compare your calculated value with to see whether the tests passes or fails)? Maybe you need another column, or extra row at the end?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants