Hi All,
I tried to use an examples table in a new way yesterday that didn't
quite work out and I was wondering whether what I wanted to do is a
valid feature request.

Here is the problematic scenario snippet

Given a SegmentRule for Segment: (campaign_segment_1) where the field:
(<fieldName>) should be: (<fieldOperator>) : (<fieldValueInDays>) days
And a SegmentRule for Segment: (campaign_segment_1) where the field:
(spend_lapsed_time) should be: (GREATER_THAN) : (7) days

And the backing fixture,

    @Given("a SegmentRule for Segment: ($segmentName) where the field:
($fieldName) should be: ($fieldOperator) : ($fieldValueInDays) days")
    @Alias("a SegmentRule for Segment: (<segmentName>) where the
field: (<fieldName>) should be: (<fieldOperator>) :
(<fieldValueInDays>) days")
    public void aSegmentRuleForSegmentInDays(@Named("segmentName")
String segmentName, @Named("fieldName") String fieldName,
                                       @Named("fieldOperator") String
operator, @Named("fieldValueInDays") String days) {
    }


and Here is the relevant part of the examples table,

Examples:
|fieldName|fieldOperator|fieldValueInDays|
|install_lapsed_time|LESS_THAN|5|


I hoped that the value from the examples table would only be
substituted in the case where I used "<...>" notation but it was
actually substituted in both cases so the story that ended up running
was

Given a SegmentRule for Segment: (campaign_segment_1) where the field:
(install_lapsed_time) should be: (LESS_THAN) : (5) days
And a SegmentRule for Segment: (campaign_segment_1) where the field:
(install_lapsed_time) should be: (LESS_THAN) : (5) days


I'm going to refactor the code to add support for a Tabular Parameters version,

Given the SegmentRules:
|SegmentName|FieldName|FieldOperator|FieldValueInDays|
|campaign_segment_1|<fieldName>|<fieldOperator>|<fieldValueInDays>|
|campaign_segment_1|spend_lapsed_time|GREATER_THAN|7|

but it won't be as human readable, which is a shame.


Regards


Caoilte

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

    http://xircles.codehaus.org/manage_email


Reply via email to