Search in sources :

Example 1 with OrangeInterface

use of org.mule.tck.testmodels.fruit.OrangeInterface in project mule by mulesoft.

the class BeanUtilsTestCase method testBeanPropertiesOnAProxy.

@Test
public void testBeanPropertiesOnAProxy() throws Exception {
    OrangeInterface o = (OrangeInterface) Proxy.newProxyInstance(getClass().getClassLoader(), new Class[] { OrangeInterface.class }, new OrangeInvocationHandler(new Orange()));
    BeanUtils.populateWithoutFail(o, map, true);
    assertNotNull(o);
    assertEquals("Juicy!", o.getBrand());
    assertEquals(new Double(2.32), o.getRadius());
    assertEquals(new Integer(22), o.getSegments());
}
Also used : OrangeInterface(org.mule.tck.testmodels.fruit.OrangeInterface) Orange(org.mule.tck.testmodels.fruit.Orange) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 Orange (org.mule.tck.testmodels.fruit.Orange)1 OrangeInterface (org.mule.tck.testmodels.fruit.OrangeInterface)1