Package org.apache.harmony.beans.tests.support.beancontext.mock

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


                .addBeanContextMembershipListener(new MockBeanContextMembershipListenerS(
                        "l3"));
        support
                .addBeanContextMembershipListener(new MockBeanContextMembershipListener());
        support.add("abcd");
        support.add(new MockBeanContextChild());
        support.add(new MockBeanContextChildS("a child"));
        support.add(new MockBeanContextChild());
        support.add("1234");
        support.add(new MockBeanContextProxyS("proxy",
                new MockBeanContextChildS("b child")));

        MockBeanContextDelegateS serMock = (MockBeanContextDelegateS) SerializationTester
View Full Code Here


         support.addBeanContextMembershipListener(new MockBeanContextMembershipListener());
         support.addBeanContextMembershipListener(new MockBeanContextMembershipListenerS("l2"));
         support.addBeanContextMembershipListener(new MockBeanContextMembershipListenerS("l3"));
         support.addBeanContextMembershipListener(new MockBeanContextMembershipListener());
         support.add("abcd");
         support.add(new MockBeanContextChild());
         support.add(new MockBeanContextChildS("a child"));
         support.add(new MockBeanContextChild());
         support.add("1234");
         SerializationTest.verifyGolden(this, mock, new SerializableAssert(){
             public void assertDeserialized(Serializable orig, Serializable ser) {
                 MockBeanContextDelegateS serMock = (MockBeanContextDelegateS) ser;
                 MockBeanContextDelegateS mock = (MockBeanContextDelegateS) orig;
View Full Code Here

        support.records.assertRecord("initialize", null);
        childSupport.records.assertRecord("initialize", null);

        MockBeanContextServiceProvider provider = new MockBeanContextServiceProvider();
        support.addService(Collection.class, provider);
        MockBeanContextChild child = new MockBeanContextChild();
        childSupport.add(child);
        String requestor = "requestor";
        String selector = "selector";
        MockBeanContextServiceRevokedListener rl = new MockBeanContextServiceRevokedListener();
        Object service = childSupport.getService(child, requestor,
View Full Code Here

    /*
     * Class under test for void
     * BeanContextChildSupport(java.beans.beancontext.BeanContextChild)
     */
    public void testBeanContextChildSupportBeanContextChild() {
        BeanContextChild c = new MockBeanContextChild();
        BeanContextChildSupport support = new MockBeanContextChildSupport(c);
        assertSame(c, support.getBeanContextChildPeer());
        assertSame(c, support.beanContextChildPeer);
    }
View Full Code Here

    public void testGetBeanContextChildPeer() throws Exception {
        BeanContextChildSupport support = new MockBeanContextChildSupport();
        assertSame(support, support.beanContextChildPeer);
        assertSame(support, support.getBeanContextChildPeer());

        BeanContextChild mockChild = new MockBeanContextChild();
        support = new MockBeanContextChildSupport(mockChild);
        assertSame(mockChild, support.beanContextChildPeer);
        assertSame(mockChild, support.getBeanContextChildPeer());

        BeanContextChildSupport sup = new BeanContextChildSupport();
View Full Code Here

    public void testIsDelegated() throws Exception {
        BeanContextChildSupport support = new MockBeanContextChildSupport();
        assertFalse(support.isDelegated());

        BeanContextChild mockChild = new MockBeanContextChild();
        support = new MockBeanContextChildSupport(mockChild);
        assertTrue(support.isDelegated());

        support.beanContextChildPeer = support;
        assertFalse(support.isDelegated());
View Full Code Here

        BeanContextChildSupport support = new MockBeanContextChildSupport();
        support.serviceRevoked(null);
    }

    public void testSetBeanContext() throws PropertyVetoException {
        BeanContextChild peer = new MockBeanContextChild();
        MockBeanContextChildSupport support = new MockBeanContextChildSupport(
                peer);
        MockPropertyChangeListener l1 = new MockPropertyChangeListener();
        MockVetoableChangeListener l2 = new MockVetoableChangeListener();
        support.addPropertyChangeListener("beanContext", l1);
View Full Code Here

                        .getDeserilizedObject(support));
    }

    public void testSerialization_WithNonSerializablePeer() throws IOException,
            ClassNotFoundException {
        MockBeanContextChild peer = new MockBeanContextChild();
        BeanContextChildSupport support = new BeanContextChildSupport(peer);
        MockPropertyChangeListener pcl1 = new MockPropertyChangeListener();
        MockPropertyChangeListenerS pcl2 = new MockPropertyChangeListenerS(
                "id of pcl2");
        MockVetoableChangeListener vcl1 = new MockVetoableChangeListener();
View Full Code Here

        assertTrue(support.isDesignTime());
    }

    public void testChildJustRemovedHook() throws TooManyListenersException {
        MockBeanContextServicesSupport support = new MockBeanContextServicesSupport();
        MockBeanContextChild child = new MockBeanContextChild();
        support.add(child);
        MockBeanContextServiceProvider provider = new MockBeanContextServiceProvider();
        support.addService(Collection.class, provider);

        MockBeanContextServiceRevokedListener rl = new MockBeanContextServiceRevokedListener();
View Full Code Here

    public void testGetService_NullParam() throws TooManyListenersException {
        MockBeanContextServicesSupport support = new MockBeanContextServicesSupport();
        MockBeanContextServiceProvider provider = new MockBeanContextServiceProvider();
        support.addService(Collection.class, provider);
        MockBeanContextChild child = new MockBeanContextChild();
        support.add(child);
        Object requestor = "a requestor";
        Object selector = "a selector";
        MockBeanContextServiceRevokedListener l = new MockBeanContextServiceRevokedListener();
View Full Code Here

TOP

Related Classes of org.apache.harmony.beans.tests.support.beancontext.mock.MockBeanContextChild

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.