@Test public void should_throw_exception_for_unknown_enum_values() { final Executable testMethod = () -> objectMapper.transform("something", TestEnum.class); final CucumberExpressionException thrownException = assertThrows(CucumberExpressionException.class, testMethod); assertThat("Unexpected message", thrownException.getMessage(), is(equalTo( "Can't transform 'something' to class io.cucumber.cucumberexpressions.BuiltInParameterTransformerTest$TestEnum. " + "Not an enum constant" ))); }
@Override public Object transform(String fromValue, Type toValueType) { return doTransform(fromValue, toValueType, toValueType); }
BuiltInParameterTransformer implements ParameterByTypeTransformer { @Override public Object transform(String fromValue, Type toValueType) { return doTransform(fromValue, toValueType, toValueType); } }
BuiltInParameterTransformer implements ParameterByTypeTransformer { @Override public Object transform(String fromValue, Type toValueType) { return doTransform(fromValue, toValueType, toValueType); } BuiltInParameterTransformer(Locale locale); }
BuiltInParameterTransformer implements ParameterByTypeTransformer { @Override public Object transform(String fromValue, Type toValueType) { return doTransform(fromValue, toValueType, toValueType); } BuiltInParameterTransformer(Locale locale); @Override Object transform(String fromValue, Type toValueType); }
BuiltInParameterTransformer implements ParameterByTypeTransformer { @Override public Object transform(String fromValue, Type toValueType) { return doTransform(fromValue, toValueType, toValueType); } BuiltInParameterTransformer(Locale locale); @Override Object transform(String fromValue, Type toValueType);  }