Examples of LongToIntegerConverter


Examples of ma.glasnost.orika.converter.builtin.NumericConverters.LongToIntegerConverter

    }
   
    @Test
    public void testLongToIntegerConverter() {
        MapperFactory factory = MappingUtil.getMapperFactory();
        factory.getConverterFactory().registerConverter(new LongToIntegerConverter(false));
        MapperFacade mapper = factory.getMapperFacade();
       
        Long value = (long) Integer.MAX_VALUE;
        Integer result = mapper.map(value, Integer.class);
        Assert.assertEquals(value.longValue(), result.longValue());
View Full Code Here

Examples of ma.glasnost.orika.converter.builtin.NumericConverters.LongToIntegerConverter

    }
   
    @Test(expected = MappingException.class)
    public void testLongToIntegerConverter_overflow() {
        MapperFactory factory = MappingUtil.getMapperFactory();
        factory.getConverterFactory().registerConverter(new LongToIntegerConverter(false));
        MapperFacade mapper = factory.getMapperFacade();
       
        Long value = (long) Integer.MAX_VALUE + 1;
        Integer result = mapper.map(value, Integer.class);
        Assert.assertEquals(value.longValue(), result.longValue());
View Full Code Here

Examples of org.auraframework.util.type.converter.LongToIntegerConverter

        return new LongToDateConverter();
    }

    @Impl
    public static Converter<?, ?> auraUtilLongToIntegerConverter() {
        return new LongToIntegerConverter();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.