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

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


    }

    public void testSerialization() throws IOException, ClassNotFoundException {
        BeanContextServiceRevokedEvent event = new BeanContextServiceRevokedEvent(
                new MockBeanContextServices(), ArrayList.class, true);
        event.setPropagatedFrom(new MockBeanContextDelegateS("from ID"));

        assertEqualsSerially(event,
                (BeanContextServiceRevokedEvent) SerializationTester
                        .getDeserilizedObject(event));
View Full Code Here


    }

     public void testSerialization_Compatibility() throws Exception {
         BeanContextServiceRevokedEvent event = new BeanContextServiceRevokedEvent(
                 new MockBeanContextServices(), ArrayList.class, true);
         event.setPropagatedFrom(new MockBeanContextDelegateS("from ID"));
         SerializationTest.verifyGolden(this, event, new SerializableAssert(){
             public void assertDeserialized(Serializable orig, Serializable ser) {
                 assertEqualsSerially((BeanContextServiceRevokedEvent) orig,
                         (BeanContextServiceRevokedEvent) ser);
             }
View Full Code Here

    }

    public void testSerialization() throws IOException, ClassNotFoundException {
        BeanContextServiceAvailableEvent event = new BeanContextServiceAvailableEvent(
                new MockBeanContextServices(), ArrayList.class);
        event.setPropagatedFrom(new MockBeanContextDelegateS("from ID"));

        assertEqualsSerially(event,
                (BeanContextServiceAvailableEvent) SerializationTester
                        .getDeserilizedObject(event));
    }
View Full Code Here


     public void testSerialization_Compatibility() throws Exception {
         BeanContextServiceAvailableEvent event = new BeanContextServiceAvailableEvent(
                 new MockBeanContextServices(), ArrayList.class);
         event.setPropagatedFrom(new MockBeanContextDelegateS("from ID"));
         SerializationTest.verifyGolden(this, event, new SerializableAssert(){
             public void assertDeserialized(Serializable orig, Serializable ser) {
                 assertEqualsSerially((BeanContextServiceAvailableEvent) orig,
                         (BeanContextServiceAvailableEvent) ser);
             }
View Full Code Here

        things.add("1");
        things.add("2");
        things.add("3");
        BeanContextMembershipEvent event = new BeanContextMembershipEvent(
                new MockBeanContext(), things);
        event.setPropagatedFrom(new MockBeanContextDelegateS("from ID"));

        assertEqualsSerially(event,
                (BeanContextMembershipEvent) SerializationTester
                        .getDeserilizedObject(event));
    }
View Full Code Here

       things.add("1");
       things.add("2");
       things.add("3");
       BeanContextMembershipEvent event = new BeanContextMembershipEvent(
               new MockBeanContext(), things);
       event.setPropagatedFrom(new MockBeanContextDelegateS("from ID"));
       SerializationTest.verifyGolden(this, event, new SerializableAssert(){
           public void assertDeserialized(Serializable orig, Serializable ser) {
               assertEqualsSerially((BeanContextMembershipEvent) orig,
                       (BeanContextMembershipEvent) ser);
           }
View Full Code Here

    }

    public void testSerialization() throws IOException, ClassNotFoundException {
        BeanContextServiceRevokedEvent event = new BeanContextServiceRevokedEvent(
                new MockBeanContextServices(), ArrayList.class, true);
        event.setPropagatedFrom(new MockBeanContextDelegateS("from ID"));

        assertEqualsSerially(event,
                (BeanContextServiceRevokedEvent) SerializationTester
                        .getDeserilizedObject(event));
View Full Code Here

    }

    public void testSerialization_Compatibility() throws Exception {
        BeanContextServiceRevokedEvent event = new BeanContextServiceRevokedEvent(
                new MockBeanContextServices(), ArrayList.class, true);
        event.setPropagatedFrom(new MockBeanContextDelegateS("from ID"));
        SerializationTest.verifyGolden(this, event, new SerializableAssert() {
            public void assertDeserialized(Serializable orig, Serializable ser) {
                assertEqualsSerially((BeanContextServiceRevokedEvent) orig,
                        (BeanContextServiceRevokedEvent) ser);
            }
View Full Code Here

                .getDeserilizedObject(support));
    }

    public void testSerialization_Peer() throws IOException,
            ClassNotFoundException {
        MockBeanContextDelegateS mock = new MockBeanContextDelegateS("main id");
        BeanContextSupport support = mock.support;
        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");
        support.add(new MockBeanContextProxyS("proxy",
                new MockBeanContextChildS("b child")));

        MockBeanContextDelegateS serMock = (MockBeanContextDelegateS) SerializationTester
                .getDeserilizedObject(mock);
        assertEquals(mock.id, serMock.id);
        assertSame(mock, mock.support.beanContextChildPeer);
        assertSame(serMock, serMock.support.beanContextChildPeer);
        assertEqualsSerially(mock.support, serMock.support);
View Full Code Here

        assertSame(serMock, serMock.support.beanContextChildPeer);
        assertEqualsSerially(mock.support, serMock.support);
    }

     public void testSerialization_Compatibility() throws Exception {
         MockBeanContextDelegateS mock = new MockBeanContextDelegateS("main id");
         BeanContextSupport support = mock.support;
         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;
                 assertEquals(mock.id, serMock.id);
                 assertSame(mock, mock.support.beanContextChildPeer);
                 assertSame(serMock, serMock.support.beanContextChildPeer);
                 assertEqualsSerially(mock.support, serMock.support);
             }
View Full Code Here

TOP

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

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.