The problem is not with the converter, but with the StepCreator.
The step creator uses the Class of the parameters instead of the Types.

I'm on version 3.8 but in the latest version the problem is still there :

*https://github.com/jbehave/jbehave-core/blob/master/jbehave-core/src/main/java/org/jbehave/core/steps/StepCreator.java
<https://github.com/jbehave/jbehave-core/blob/master/jbehave-core/src/main/java/org/jbehave/core/steps/StepCreator.java>*

Line 805.

It's a problem only for the MethodInvoker, I guess it's not a problem for
other cases since for the other you use method.getGenericParameterTypes();
(line 108)


Thanks for the quick answer

2014-09-30 13:39 GMT+02:00 Mauro Talevi <mauro.tal...@aquilonia.org>:

> ParameterConverter#accept(Type) method supports generics.
>
> Which version of JBehave are you on?
>
>
>
> > On 30 Sep 2014, at 13:01, Matthieu Mestrez <mestrez.matth...@gmail.com>
> wrote:
> >
> > Hello,
> >
> > I've been trying to make use of a list of strings in a Meta in this
> context :
> >
> > Scenario: 1. First Case
> > Meta :
> > @Dataset firstDataset.xml, secondDataset.xml
> > Given ...
> > When ..
> > Then ...
> >
> > And in the
> > @BeforeScenario
> > public void initializeDataset(@Named("Dataset") List<String>
> dbUnitFiles) {
> > ...
> > }
> >
> >
> > The scenario fails because
> "org.jbehave.core.steps.ParameterConverters$ParameterConvertionFailed: No
> parameter converter for interface java.util.List'
> >
> >
> > If i debug, he passes through the StringListConverter, but in the accept
> method the type is not an instance of ParameterizedType, because in the
> StepCreator class you use method.getParameterTypes() that doesn't retrieve
> de generics but the Class type (so java.util.List)
> >
> > I think that you should use for that Parameter class the Type and not
> the Class
> >
> >
> > Or maybe i've made a mistake somewhere
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>


-- 
Mestrez Matthieu
avenue Jolé 11
1160 Auderghem
GSM : 0494/77.26.87
e-mail : mestrez.matth...@gmail.com

Reply via email to