Posting to both...I can use the StackOverflow points ;-)

There isn't support for that directly as I understand it - though getting 
ExampleTable values as Parameters will kick in the ParameterConverters - of 
which an ExampleTable ParameterConverter is setup by default. I'm sure that 
there is a parsing bug in there.

That said, your "Then" needs to work for all rows of the Examples: section. I'm 
sure that that is why you were thinking of putting all of them in the Then - 
you can then pluck out the right one...but that doesn't feel right.

Could you do the following:

Given players registered in the Data Warehouse and some combination of Loyalty1 
and/or Loyalty2 programs:
|id|first name|last name|city     |province|loyalty1 |loyalty2|
|1 |Pete      |Walter   |Winnipeg |<null>  |false    |true    |
|2 |Jon       |Dewit    |Winnipeg |MB      |true     |true    |
|3 |John      |Dewit    |<null>   |<null>  |true     |true    |
|4 |Peter     |Dewalt   |<null>   |<null>  |true     |false   |
When the <firstnamecriteria> and <lastnamecriteria> criteria are specified
Then the system displays the correct results, using a case-insensitive "begins 
with" search with users <userlist>

Examples:
|firstnamecriteria|lastnamecriteria|userlist|
|Jo               |                |2,3     |
|                 |Dew             |2,3,4   |
|J                |D               |2,3     |


Or something like

Then the system displays the correct results, using a case-insensitive "begins 
with" search with results like <tableurl>

Examples:
|firstnamecriteria|lastnamecriteria|tableurl                   |
|Jo               |                |results_for_Jo_null.table  |
|                 |Dew             |results_for_null_Dew.table |
|J                |D               |results_for_J_D.table      |

Or don't use parameterized scenarios

When the Jo and <null> criteria are specified
Then the system displays the correct results, using a case-insensitive "begins 
with" search with results like
|firstname|lastname|
|Jon      |Dewitt  |
|John     |Dewitt  |
When the J and D criteria are specified
Then the system displays the correct results, using a case-insensitive "begins 
with" search with results like
|firstname|lastname|
|Jon      |Dewitt  |
|John     |Dewitt  |
...

Brian

----- Original message -----
From: "Craig Tataryn" <[email protected]>
To: [email protected]
Date: Wed, 7 Mar 2012 20:03:17 +0000 (UTC)
Subject: [jbehave-user] Re: Nest Tables?

Mauro Talevi <mauro.talevi@...> writes:

> 
> Hi,
> 
> you can already use tables both in steps and to parametrise scenarios.   
> The only constraint is that the parameter names must be unique and 
> cannot be "overloaded".   See the parametrised_table.story in the trader 
> example.
> 

This is sort of what I need, but not quite.  Looks like parametrized scenarios 
are good for embedding one column from an examples table, I need a bit more 
than 
that.

For now, I've just kind of added duplicate rows for each set of search criteria 
and then I post-process it in the steps to make it indexable by those two 
criteria columns.

> Brian is working on a usecase that aims to remove this constraint.  It's 
> worth waiting for his scenarios to see if they satisfy you usecase too.
> 

I'll keep my eye on it, thanks for the heads up.

Craig.

> Cheers
> 
> On 07/03/2012 18:07, Craig Tataryn wrote:
> > Hi there, I have the desire to use "nested tables" in one of my stories.  
I've
> > depicted the problem here: 
http://stackoverflow.com/questions/9604520/nested-
> > tables-in-jbehave
> >
> > Is this possible?  If so, how?
> >
> > Thanks,
> >
> > Craig.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list, please visit:
> >
> >      http://xircles.codehaus.org/manage_email
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to