Examples of BeanProxy


Examples of com.volantis.mcs.interaction.BeanProxy

        Address address = createFlintStoneAddress();
        List lines = address.getLines();

        Person person = createFredFlintstone(address);

        BeanProxy rootProxy = (BeanProxy) createProxy(person);
        rootProxy.addListener(shallowListenerMock, false);
        rootProxy.addListener(deepListenerMock, true);
        Object value;

        // Check that the first name proxy works.
        OpaqueProxy firstNameProxy = (OpaqueProxy) rootProxy.getPropertyProxy(
                Person.FIRST_NAME);
        value = firstNameProxy.getModelObject();
        assertEquals("first name", "Fred", value);

        // Check that the last name proxy works.
        OpaqueProxy lastNameProxy = (OpaqueProxy) rootProxy.getPropertyProxy(
                Person.LAST_NAME);
        value = lastNameProxy.getModelObject();
        assertEquals("last name", "Flintstone", value);

        // Check that the age proxy works.
        OpaqueProxy ageProxy = (OpaqueProxy) rootProxy.getPropertyProxy(
                Person.AGE);
        value = ageProxy.getModelObject();
        assertEquals("age", new Integer(10040), value);

        // Check that the address proxy works.
        BeanProxy addressProxy = (BeanProxy) rootProxy.getPropertyProxy(
                Person.ADDRESS);
        ListProxy linesProxy = (ListProxy) addressProxy.getPropertyProxy(
                Address.LINES);
        int size = linesProxy.size();
        OpaqueProxy lineProxy;
        for (int i = 0; i < size; i += 1) {
            lineProxy = (OpaqueProxy) linesProxy.getItemProxy(i);
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.