Examples of MockBeanContextChild


Examples of org.apache.harmony.beans.tests.support.beancontext.mock.MockBeanContextChild

        MockVetoableChangeListener l3 = new MockVetoableChangeListener();
        support.addBeanContextMembershipListener(l1);
        support.addPropertyChangeListener("children", l2);
        support.addVetoableChangeListener("children", l3);

        BeanContextChild child = new MockBeanContextChild();
        support.add(child);
        support.records.assertRecord("initialize", null);
        support.records.assertRecord("validatePendingAdd", child, Boolean.TRUE);
        support.records.assertRecord("createBCSChild", child, null, support
                .children().get(child));
        support.records.assertRecord("childJustAddedHook", child, support
                .children().get(child), null);
        support.records.assertEndOfRecords();
        assertTrue(l1.lastEventAdd);
        assertMembershipEvent(l1.lastEvent, support, null, child);
        assertNull(l2.lastEvent);
        assertNull(l3.lastEvent);

        assertSame(support, child.getBeanContext());
    }
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.