Did you have already faced a case where you want to write different
sentences like this :

Given a user with blue eyes
Given a user measuring 1m80
Given a user measuring 1m80 with blue eyes
Given a user of 21 years old
Given a user of 21 years old measuring 1m80
Given a user of 21 years old measuring 1m80 with blue eyes
Given a user of 21 years old with blue eyes
...

I don't want to write one Step method for each combination, because
that would really be too long (too much method to write, but also too
much pattern).
I could use a different approach where each Step can give one an only
one characteristics.  But I fear mys story may became too long.  Also,
the steps would be more complex to write.  The 'user object' can not
be build at once.  The step must implement some builder logic keeping
all the given characteristics, and will have to be smart enough to
know when all characteristics are known and the object can be created.

I have started to write an OptionalStepPatternParser to solve that can
handle a pattern like this "a user [of $age year[s] old] [measuring
$size] [with $color eyes]"

But before I continue deeper in this track, I would like to know how
others are doing ?



Gilles Scokart

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

    http://xircles.codehaus.org/manage_email


Reply via email to