Package org.openengsb.core.util.beans

Examples of org.openengsb.core.util.beans.BeanWithMultiValues


    }

    @SuppressWarnings("unchecked")
    @Test
    public void testBuildMapFromMultiValueBean_shouldContainAllValues() throws Exception {
        BeanWithMultiValues testBean = new BeanWithMultiValues(42, 2.0, 3.1415, 1.4142135);
        Map<String, Object> map = BeanUtilsExtended.buildObjectAttributeMap(testBean);
        assertThat((Long) map.get("id"), is(42L));
        assertThat((List<Double>) map.get("numbers"), is(Arrays.asList(2.0, 3.1415, 1.4142135)));
    }
View Full Code Here


        assertThat((List<Double>) map.get("numbers"), is(Arrays.asList(2.0, 3.1415, 1.4142135)));
    }

    @Test
    public void testBuildMapFromMultiValueBeanAndRebuild_shouldBeEqualtoOriginalBean() throws Exception {
        BeanWithMultiValues testBean = new BeanWithMultiValues(42, 2.0, 3.1415, 1.4142135);
        Map<String, Object> map = BeanUtilsExtended.buildObjectAttributeMap(testBean);
        BeanWithMultiValues built = BeanUtilsExtended.createBeanFromAttributeMap(BeanWithMultiValues.class, map);
        assertThat(built, is(testBean));
    }
View Full Code Here

TOP

Related Classes of org.openengsb.core.util.beans.BeanWithMultiValues

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.