Examples of BigDecimalToFloatConverter


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

    }
   
    @Test
    public void testBigDecimalToFloatConverter() {
        MapperFactory factory = MappingUtil.getMapperFactory();
        factory.getConverterFactory().registerConverter(new BigDecimalToFloatConverter());
        MapperFacade mapper = factory.getMapperFacade();
       
        BigDecimal bd = new BigDecimal("5423.51");
        Float ft = mapper.map(bd, Float.class);
        Assert.assertEquals(bd.floatValue(), ft.floatValue(), 0.01d);
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.