[jbehave-dev] [jira] Commented: (JBEHAVE-216) Allow to indicate which is the weight of each StepsCandidate class used by a Scenario class to resolve duplicated methods.

2010-02-21 Thread Mauro Talevi (JIRA)

[ 
http://jira.codehaus.org/browse/JBEHAVE-216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=210983#action_210983
 ] 

Mauro Talevi commented on JBEHAVE-216:
--

A solution is now provided by the ability to prioritise step methods (see 
JBEHAVE-162). 

All candidate steps, coming from all Steps classes, are collected and 
prioritised. 



 Allow to indicate which is the weight of each StepsCandidate class used by a 
 Scenario class to resolve duplicated methods.
 --

 Key: JBEHAVE-216
 URL: http://jira.codehaus.org/browse/JBEHAVE-216
 Project: JBehave
  Issue Type: New Feature
  Components: Core
Affects Versions: 2.4
Reporter: Cristiano Gavião
 Fix For: 2.5


 With the addition of the GivenScenarios feature, almost often will be 
 necessary to inform more than one StepsCandidate class for one Scenario class.
 The problem is that those StepsCandidates could have same methods, or could 
 be extending the same parent class and sharing same method. 
 Jbehave will get the first occurrence of method that match textual sentence, 
 which not necessarily will be the desired one.
 So I would like that jbehave had some way to stablish a weight, or an order, 
 or maybe indicate a default steps class (or anything like that) where I could 
 indicate which is the best path it should be taken.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] Commented: (JBEHAVE-216) Allow to indicate which is the weight of each StepsCandidate class used by a Scenario class to resolve duplicated methods.

2010-01-14 Thread Jonathan Ross (JIRA)

[ 
http://jira.codehaus.org/browse/JBEHAVE-216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=206974#action_206974
 ] 

Jonathan Ross commented on JBEHAVE-216:
---

A similar issue comes into play if you have similarly worded steps, like
@When(the user logs in as $user)
@When(the user logs in as $user, with password $password)
If the second step is listed first in the Steps class, it will match
When the user logs in as me, with password xxx
correctly, but if it is second in the file, the first step will be executed 
with me, with password xxx as the user variable.  Usually it is more natural 
to declare steps (java methods in general) in ascending order of complexity.

Perhaps this should be a separate jira ticket, but this could be solved by 
using non-greedy matching, or, as a bit of a hack, by sorting the annotations 
in descending string length.



 Allow to indicate which is the weight of each StepsCandidate class used by a 
 Scenario class to resolve duplicated methods.
 --

 Key: JBEHAVE-216
 URL: http://jira.codehaus.org/browse/JBEHAVE-216
 Project: JBehave
  Issue Type: New Feature
  Components: Core
Affects Versions: 2.4
Reporter: Cristiano Gavião
 Fix For: 2.5


 With the addition of the GivenScenarios feature, almost often will be 
 necessary to inform more than one StepsCandidate class for one Scenario class.
 The problem is that those StepsCandidates could have same methods, or could 
 be extending the same parent class and sharing same method. 
 Jbehave will get the first occurrence of method that match textual sentence, 
 which not necessarily will be the desired one.
 So I would like that jbehave had some way to stablish a weight, or an order, 
 or maybe indicate a default steps class (or anything like that) where I could 
 indicate which is the best path it should be taken.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email