Search in sources :

Example 1 with TypeLiteral

use of org.apache.commons.lang3.reflect.TypeLiteral in project jbehave-core by jbehave.

the class ParameterConvertersBehaviour method shouldFailToConvertCommaSeparatedValuesOfInvalidNumbers.

@Test
public void shouldFailToConvertCommaSeparatedValuesOfInvalidNumbers() {
    expectedException.expect(ParameterConvertionFailed.class);
    new NumberListConverter().convertValue("3x, x.5", new TypeLiteral<List<Number>>() {
    }.getType());
}
Also used : TypeLiteral(org.apache.commons.lang3.reflect.TypeLiteral) NumberListConverter(org.jbehave.core.steps.ParameterConverters.NumberListConverter) Test(org.junit.Test)

Aggregations

TypeLiteral (org.apache.commons.lang3.reflect.TypeLiteral)1 NumberListConverter (org.jbehave.core.steps.ParameterConverters.NumberListConverter)1 Test (org.junit.Test)1