Search in sources :

Example 1 with CharSequenceIntegerConverter

use of org.simpleflatmapper.converter.impl.CharSequenceIntegerConverter in project SimpleFlatMapper by arnaudroger.

the class ConverterServiceTest method testListToNumberSOE.

@Test
public void testListToNumberSOE() {
    ConverterService converterService = ConverterService.getInstance();
    Converter<? super List, ? extends Integer> converter = converterService.findConverter(List.class, Integer.class);
    assertTrue(converter instanceof ComposedConverter);
    ComposedConverter composedConverter = (ComposedConverter) converter;
    assertTrue(composedConverter.c1 instanceof ToStringConverter);
    assertTrue(composedConverter.c2 instanceof CharSequenceIntegerConverter);
}
Also used : ComposedConverter(org.simpleflatmapper.converter.ComposedConverter) ToStringConverter(org.simpleflatmapper.converter.ToStringConverter) CharSequenceIntegerConverter(org.simpleflatmapper.converter.impl.CharSequenceIntegerConverter) ConverterService(org.simpleflatmapper.converter.ConverterService) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 ComposedConverter (org.simpleflatmapper.converter.ComposedConverter)1 ConverterService (org.simpleflatmapper.converter.ConverterService)1 ToStringConverter (org.simpleflatmapper.converter.ToStringConverter)1 CharSequenceIntegerConverter (org.simpleflatmapper.converter.impl.CharSequenceIntegerConverter)1