use of org.apache.camel.cdi.pojo.TypeConverterOutput in project camel by apache.
the class InjectedTypeConverterTest method convertWithTypeConverter.
@Test
public void convertWithTypeConverter(TypeConverter converter) throws NoTypeConversionAvailableException {
TypeConverterInput input = new TypeConverterInput();
input.setProperty("property value is [{{property2}}]");
TypeConverterOutput output = converter.mandatoryConvertTo(TypeConverterOutput.class, input);
assertThat(output.getProperty(), is(equalTo("property value is [value 2]")));
}
use of org.apache.camel.cdi.pojo.TypeConverterOutput in project camel by apache.
the class InjectedTypeConverter method convert.
@Converter
public TypeConverterOutput convert(TypeConverterInput input) throws Exception {
TypeConverterOutput output = new TypeConverterOutput();
output.setProperty(context.resolvePropertyPlaceholders(input.getProperty()));
return output;
}
Aggregations