use of org.jbehave.core.steps.ParameterConverters.EnumListConverter in project jbehave-core by jbehave.
the class ParameterConvertersBehaviour method shouldConvertEnumList.
@Test
public void shouldConvertEnumList() {
ParameterConverter converter = new EnumListConverter();
Type type = new TypeLiteral<List<SomeEnum>>() {
}.getType();
assertThat(converter.accept(type), is(true));
List<Enum> list = (List<Enum>) converter.convertValue("ONE,TWO,THREE", type);
assertThatCollectionIs(list, SomeEnum.ONE, SomeEnum.TWO, SomeEnum.THREE);
}
Aggregations