Package ma.glasnost.orika.converter.builtin.NumericConverters

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


public class NumericConvertersTestCase {
   
    @Test
    public void testBigDecimalToDoubleConverter() {
        MapperFactory factory = MappingUtil.getMapperFactory();
        factory.getConverterFactory().registerConverter(new BigDecimalToDoubleConverter());
        MapperFacade mapper = factory.getMapperFacade();
       
        BigDecimal bd = new BigDecimal("5423.51478");
        Double db = mapper.map(bd, Double.class);
        Assert.assertEquals(bd.doubleValue(), db.doubleValue(), 0.00001d);
View Full Code Here

TOP

Related Classes of ma.glasnost.orika.converter.builtin.NumericConverters.BigDecimalToDoubleConverter

Copyright © 2018 www.massapicom. 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.