harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r536828 - in /harmony/enhanced/classlib/trunk/modules/beans/src/test: java/org/apache/harmony/beans/tests/java/beans/ java/org/apache/harmony/beans/tests/java/beans/beancontext/ resources/serialization/java/beans/ resources/serialization/ja...
Date Thu, 10 May 2007 11:28:15 GMT
Author: pyang
Date: Thu May 10 04:28:14 2007
New Revision: 536828

URL: http://svn.apache.org/viewvc?view=rev&rev=536828
Log:
Recreate the serialization golden files, the original ones even don't work on RI

Added:
    harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/VetoableChangeSupportTest.golden.ser
  (with props)
    harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/beancontext/
    harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextChildSupportTest.golden.ser
  (with props)
    harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextMembershipEventTest.golden.ser
  (with props)
    harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceAvailableEventTest.golden.ser
  (with props)
    harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceRevokedEventTest.golden.ser
  (with props)
    harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServicesSupportTest.golden.ser
  (with props)
    harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextSupportTest.golden.ser
  (with props)
Removed:
    harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/java/beans/VetoableChangeSupport.ser
    harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/java/beans/beancontext/
Modified:
    harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/VetoableChangeSupportTest.java
    harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextChildSupportTest.java
    harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextMembershipEventTest.java
    harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceAvailableEventTest.java
    harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceRevokedEventTest.java
    harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServicesSupportTest.java
    harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextSupportTest.java

Modified: harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/VetoableChangeSupportTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/VetoableChangeSupportTest.java?view=diff&rev=536828&r1=536827&r2=536828
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/VetoableChangeSupportTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/VetoableChangeSupportTest.java
Thu May 10 04:28:14 2007
@@ -34,9 +34,12 @@
 
 import junit.framework.TestCase;
 
+import org.apache.harmony.beans.tests.support.beancontext.mock.MockBeanContextDelegateS;
 import org.apache.harmony.beans.tests.support.beancontext.mock.MockVetoableChangeListener;
 import org.apache.harmony.beans.tests.support.mock.NonSerializedVCListener;
 import org.apache.harmony.beans.tests.support.mock.SerializedVCListener;
+import org.apache.harmony.testframework.serialization.SerializationTest;
+import org.apache.harmony.testframework.serialization.SerializationTest.SerializableAssert;
 
 import tests.util.SerializationTester;
 
@@ -1629,44 +1632,48 @@
 
     }
 
-    public void testSerialization_Compatibility() throws Exception {
-        MockSource source = new MockSource();
-        VetoableChangeSupport support = new VetoableChangeSupport(source);
-
-        String propertyName1 = "text";
-        SerializedVCListener serialized = new SerializedVCListener(
-                propertyName1);
-        support.addVetoableChangeListener(propertyName1, serialized);
-
-        String propertyName2 = "top";
-        NonSerializedVCListener nonSerialized = new NonSerializedVCListener(
-                propertyName2);
-        support.addVetoableChangeListener(propertyName2, nonSerialized);
-
-        assertTrue(support.hasListeners(propertyName1));
-        assertTrue(support.hasListeners(propertyName2));
-        assertEquals(2, support.getVetoableChangeListeners().length);
-        assertEquals(1,
-                support.getVetoableChangeListeners(propertyName1).length);
-        assertEquals(1,
-                support.getVetoableChangeListeners(propertyName2).length);
-
-        VetoableChangeSupport deserializedSupport = (VetoableChangeSupport) SerializationTester
-                .readObject(support,
-                        "serialization/java/beans/VetoableChangeSupport.ser");
 
-        assertTrue(deserializedSupport.hasListeners(propertyName1));
-        assertFalse(deserializedSupport.hasListeners(propertyName2));
-        assertEquals(1, deserializedSupport.getVetoableChangeListeners().length);
-        assertEquals(1, deserializedSupport
-                .getVetoableChangeListeners(propertyName1).length);
-        assertEquals(0, deserializedSupport
-                .getVetoableChangeListeners(propertyName2).length);
-
-        assertEquals(
-                support.getVetoableChangeListeners(propertyName1)[0],
-                deserializedSupport.getVetoableChangeListeners(propertyName1)[0]);
-    }
+     public void testSerialization_Compatibility() throws Exception {
+         MockSource source = new MockSource();
+         VetoableChangeSupport support = new VetoableChangeSupport(source);
+ 
+         final String propertyName1 = "text";
+         SerializedVCListener serialized = new SerializedVCListener(
+                 propertyName1);
+         support.addVetoableChangeListener(propertyName1, serialized);
+ 
+         final String propertyName2 = "top";
+         NonSerializedVCListener nonSerialized = new NonSerializedVCListener(
+                 propertyName2);
+         support.addVetoableChangeListener(propertyName2, nonSerialized);
+ 
+         assertTrue(support.hasListeners(propertyName1));
+         assertTrue(support.hasListeners(propertyName2));
+         assertEquals(2, support.getVetoableChangeListeners().length);
+         assertEquals(1,
+                 support.getVetoableChangeListeners(propertyName1).length);
+         assertEquals(1,
+                 support.getVetoableChangeListeners(propertyName2).length);
+ 
+         SerializationTest.verifyGolden(this, support, new SerializableAssert(){
+             public void assertDeserialized(Serializable orig, Serializable ser) {
+                 VetoableChangeSupport support = (VetoableChangeSupport)orig;
+                 VetoableChangeSupport deserializedSupport = (VetoableChangeSupport)ser;
+                 
+                 assertTrue(deserializedSupport.hasListeners(propertyName1));
+                 assertFalse(deserializedSupport.hasListeners(propertyName2));
+                 assertEquals(1, deserializedSupport.getVetoableChangeListeners().length);
+                 assertEquals(1, deserializedSupport
+                         .getVetoableChangeListeners(propertyName1).length);
+                 assertEquals(0, deserializedSupport
+                         .getVetoableChangeListeners(propertyName2).length);
+ 
+                 assertEquals(
+                         support.getVetoableChangeListeners(propertyName1)[0],
+                         deserializedSupport.getVetoableChangeListeners(propertyName1)[0]);
+             }
+         });
+     }
 
     public static class MockSource implements Serializable {
 

Modified: harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextChildSupportTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextChildSupportTest.java?view=diff&rev=536828&r1=536827&r2=536828
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextChildSupportTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextChildSupportTest.java
Thu May 10 04:28:14 2007
@@ -25,6 +25,7 @@
 import java.beans.beancontext.BeanContext;
 import java.beans.beancontext.BeanContextChild;
 import java.beans.beancontext.BeanContextChildSupport;
+import java.beans.beancontext.BeanContextMembershipEvent;
 import java.beans.beancontext.BeanContextSupport;
 import java.io.IOException;
 import java.io.Serializable;
@@ -42,6 +43,8 @@
 import org.apache.harmony.beans.tests.support.beancontext.mock.MockVetoChangeListener;
 import org.apache.harmony.beans.tests.support.beancontext.mock.MockVetoableChangeListener;
 import org.apache.harmony.beans.tests.support.beancontext.mock.MockVetoableChangeListenerS;
+import org.apache.harmony.testframework.serialization.SerializationTest;
+import org.apache.harmony.testframework.serialization.SerializationTest.SerializableAssert;
 
 import tests.util.SerializationTester;
 
@@ -842,28 +845,28 @@
                         .getDeserilizedObject(support));
     }
 
-    public void testSerialization_Compatibility() throws IOException,
-            ClassNotFoundException, Exception {
-        MockBeanContextChildDelegateS peer = new MockBeanContextChildDelegateS(
-                "id of peer");
-        BeanContextChildSupport support = peer.support;
-        MockPropertyChangeListener pcl1 = new MockPropertyChangeListener();
-        MockPropertyChangeListenerS pcl2 = new MockPropertyChangeListenerS(
-                "id of pcl2");
-        MockVetoableChangeListener vcl1 = new MockVetoableChangeListener();
-        MockVetoableChangeListenerS vcl2 = new MockVetoableChangeListenerS(
-                "id of vcl2");
-        support.addPropertyChangeListener("beanContext", pcl1);
-        support.addPropertyChangeListener("beanContext", pcl2);
-        support.addVetoableChangeListener("beanContext", vcl1);
-        support.addVetoableChangeListener("beanContext", vcl2);
-
-        assertEqualsSerially(
-                support,
-                (BeanContextChildSupport) SerializationTester
-                        .readObject(support,
-                                "serialization/java/beans/beancontext/BeanContextChildSupport.ser"));
-    }
+     public void testSerialization_Compatibility() throws IOException,
+             ClassNotFoundException, Exception {
+         MockBeanContextChildDelegateS peer = new MockBeanContextChildDelegateS(
+                 "id of peer");
+         BeanContextChildSupport support = peer.support;
+         MockPropertyChangeListener pcl1 = new MockPropertyChangeListener();
+         MockPropertyChangeListenerS pcl2 = new MockPropertyChangeListenerS(
+                 "id of pcl2");
+         MockVetoableChangeListener vcl1 = new MockVetoableChangeListener();
+         MockVetoableChangeListenerS vcl2 = new MockVetoableChangeListenerS(
+                 "id of vcl2");
+         support.addPropertyChangeListener("beanContext", pcl1);
+         support.addPropertyChangeListener("beanContext", pcl2);
+         support.addVetoableChangeListener("beanContext", vcl1);
+         support.addVetoableChangeListener("beanContext", vcl2);
+         SerializationTest.verifyGolden(this, support, new SerializableAssert(){
+             public void assertDeserialized(Serializable orig, Serializable ser) {
+                 assertEqualsSerially((BeanContextChildSupport) orig,
+                         (BeanContextChildSupport) ser);
+             }
+         });
+     }
 
     public static void assertEqualsSerially(BeanContextChildSupport orig,
             BeanContextChildSupport ser) {

Modified: harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextMembershipEventTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextMembershipEventTest.java?view=diff&rev=536828&r1=536827&r2=536828
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextMembershipEventTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextMembershipEventTest.java
Thu May 10 04:28:14 2007
@@ -19,6 +19,7 @@
 
 import java.beans.beancontext.BeanContext;
 import java.beans.beancontext.BeanContextMembershipEvent;
+import java.beans.beancontext.BeanContextServiceAvailableEvent;
 import java.io.IOException;
 import java.io.Serializable;
 import java.util.ArrayList;
@@ -30,6 +31,8 @@
 import org.apache.harmony.beans.tests.support.beancontext.Utils;
 import org.apache.harmony.beans.tests.support.beancontext.mock.MockBeanContext;
 import org.apache.harmony.beans.tests.support.beancontext.mock.MockBeanContextDelegateS;
+import org.apache.harmony.testframework.serialization.SerializationTest;
+import org.apache.harmony.testframework.serialization.SerializationTest.SerializableAssert;
 
 import tests.util.SerializationTester;
 
@@ -247,21 +250,21 @@
                         .getDeserilizedObject(event));
     }
 
-    public void testSerialization_Compatibility() throws Exception {
-        ArrayList<String> things = new ArrayList<String>();
-        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
-                        .readObject(event,
-                                "serialization/java/beans/beancontext/BeanContextMembershipEvent.ser"));
-    }
+   public void testSerialization_Compatibility() throws Exception {
+       ArrayList<String> things = new ArrayList<String>();
+       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);
+           }
+       });
+   }
 
     private void assertEqualsSerially(BeanContextMembershipEvent orig,
             BeanContextMembershipEvent ser) {

Modified: harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceAvailableEventTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceAvailableEventTest.java?view=diff&rev=536828&r1=536827&r2=536828
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceAvailableEventTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceAvailableEventTest.java
Thu May 10 04:28:14 2007
@@ -19,6 +19,7 @@
 
 import java.beans.beancontext.BeanContext;
 import java.beans.beancontext.BeanContextServiceAvailableEvent;
+import java.beans.beancontext.BeanContextServiceRevokedEvent;
 import java.beans.beancontext.BeanContextServices;
 import java.io.IOException;
 import java.io.Serializable;
@@ -29,6 +30,8 @@
 
 import org.apache.harmony.beans.tests.support.beancontext.mock.MockBeanContextDelegateS;
 import org.apache.harmony.beans.tests.support.beancontext.mock.MockBeanContextServices;
+import org.apache.harmony.testframework.serialization.SerializationTest;
+import org.apache.harmony.testframework.serialization.SerializationTest.SerializableAssert;
 
 import tests.util.SerializationTester;
 
@@ -124,17 +127,18 @@
                         .getDeserilizedObject(event));
     }
 
-    public void testSerialization_Compatibility() throws Exception {
-        BeanContextServiceAvailableEvent event = new BeanContextServiceAvailableEvent(
-                new MockBeanContextServices(), ArrayList.class);
-        event.setPropagatedFrom(new MockBeanContextDelegateS("from ID"));
 
-        assertEqualsSerially(
-                event,
-                (BeanContextServiceAvailableEvent) SerializationTester
-                        .readObject(event,
-                                "serialization/java/beans/beancontext/BeanContextServiceAvailableEvent.ser"));
-    }
+     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);
+             }
+         });
+     }
 
     private void assertEqualsSerially(BeanContextServiceAvailableEvent orig,
             BeanContextServiceAvailableEvent ser) {

Modified: harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceRevokedEventTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceRevokedEventTest.java?view=diff&rev=536828&r1=536827&r2=536828
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceRevokedEventTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceRevokedEventTest.java
Thu May 10 04:28:14 2007
@@ -30,6 +30,8 @@
 
 import org.apache.harmony.beans.tests.support.beancontext.mock.MockBeanContextDelegateS;
 import org.apache.harmony.beans.tests.support.beancontext.mock.MockBeanContextServices;
+import org.apache.harmony.testframework.serialization.SerializationTest;
+import org.apache.harmony.testframework.serialization.SerializationTest.SerializableAssert;
 
 import tests.util.SerializationTester;
 
@@ -150,18 +152,17 @@
                         .getDeserilizedObject(event));
     }
 
-    public void testSerialization_Compatibility() throws Exception {
-        BeanContextServiceRevokedEvent event = new BeanContextServiceRevokedEvent(
-                new MockBeanContextServices(), ArrayList.class, true);
-        event.setPropagatedFrom(new MockBeanContextDelegateS("from ID"));
-
-        assertEqualsSerially(
-                event,
-                (BeanContextServiceRevokedEvent) SerializationTester
-                        .readObject(event,
-                                "serialization/java/beans/beancontext/BeanContextServiceRevokedEvent.ser"));
-    }
-
+     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);
+             }
+         });
+     }
     private void assertEqualsSerially(BeanContextServiceRevokedEvent orig,
             BeanContextServiceRevokedEvent ser) {
         assertNull(ser.getSource());

Modified: harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServicesSupportTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServicesSupportTest.java?view=diff&rev=536828&r1=536827&r2=536828
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServicesSupportTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServicesSupportTest.java
Thu May 10 04:28:14 2007
@@ -48,6 +48,8 @@
 import org.apache.harmony.beans.tests.support.beancontext.mock.MockBeanContextServices;
 import org.apache.harmony.beans.tests.support.beancontext.mock.MockBeanContextServicesListener;
 import org.apache.harmony.beans.tests.support.beancontext.mock.MockBeanContextServicesListenerS;
+import org.apache.harmony.testframework.serialization.SerializationTest;
+import org.apache.harmony.testframework.serialization.SerializationTest.SerializableAssert;
 
 import tests.util.SerializationTester;
 
@@ -1295,34 +1297,35 @@
                         .getDeserilizedObject(support));
     }
 
-    public void testSerialization_Compatibility() throws Exception {
-        BeanContextServicesSupport support = new BeanContextServicesSupport(
-                null, Locale.ITALY, true, true);
-        support
-                .addBeanContextServicesListener(new MockBeanContextServicesListener());
-        support
-                .addBeanContextServicesListener(new MockBeanContextServicesListenerS(
-                        "l2"));
-        support
-                .addBeanContextServicesListener(new MockBeanContextServicesListenerS(
-                        "l3"));
-        support
-                .addBeanContextServicesListener(new MockBeanContextServicesListener());
-        support.addService(Collection.class,
-                new MockBeanContextServiceProvider());
-        support.addService(List.class,
-                new MockBeanContextServiceProviderS("p1"));
-        support
-                .addService(Set.class,
-                        new MockBeanContextServiceProviderS("p2"));
-        support.addService(Map.class, new MockBeanContextServiceProvider());
-
-        assertEqualsSerially(
-                support,
-                (BeanContextServicesSupport) SerializationTester
-                        .readObject(support,
-                                "serialization/java/beans/beancontext/BeanContextServicesSupport.ser"));
-    }
+     public void testSerialization_Compatibility() throws Exception {
+         BeanContextServicesSupport support = new BeanContextServicesSupport(
+                 null, Locale.ITALY, true, true);
+         support
+                 .addBeanContextServicesListener(new MockBeanContextServicesListener());
+         support
+                 .addBeanContextServicesListener(new MockBeanContextServicesListenerS(
+                         "l2"));
+         support
+                 .addBeanContextServicesListener(new MockBeanContextServicesListenerS(
+                         "l3"));
+         support
+                 .addBeanContextServicesListener(new MockBeanContextServicesListener());
+         support.addService(Collection.class,
+                 new MockBeanContextServiceProvider());
+         support.addService(List.class,
+                 new MockBeanContextServiceProviderS("p1"));
+         support
+                 .addService(Set.class,
+                         new MockBeanContextServiceProviderS("p2"));
+         support.addService(Map.class, new MockBeanContextServiceProvider());
+         SerializationTest.verifyGolden(this, support, new SerializableAssert(){
+             public void assertDeserialized(Serializable initial, Serializable deserialized)
{
+                 assertEqualsSerially((BeanContextServicesSupport) initial,
+                         (BeanContextServicesSupport) deserialized);
+             }
+         });
+     }
+  
 
     public static void assertEqualsSerially(BeanContextServicesSupport orig,
             BeanContextServicesSupport ser) {

Modified: harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextSupportTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextSupportTest.java?view=diff&rev=536828&r1=536827&r2=536828
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextSupportTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextSupportTest.java
Thu May 10 04:28:14 2007
@@ -66,6 +66,8 @@
 import org.apache.harmony.beans.tests.support.beancontext.mock.MockVetoChangeListener;
 import org.apache.harmony.beans.tests.support.beancontext.mock.MockVetoableChangeListener;
 import org.apache.harmony.beans.tests.support.beancontext.mock.MockVisibility;
+import org.apache.harmony.testframework.serialization.SerializationTest;
+import org.apache.harmony.testframework.serialization.SerializationTest.SerializableAssert;
 
 import tests.util.SerializationTester;
 
@@ -2033,27 +2035,31 @@
         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");
-
-        MockBeanContextDelegateS serMock = (MockBeanContextDelegateS) SerializationTester
-                .readObject(mock, "serialization/java/beans/beancontext/BeanContextSupport.ser");
-        assertEquals(mock.id, serMock.id);
-        assertSame(mock, mock.support.beanContextChildPeer);
-        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);
+             }
+         });
+     }
+ 
     private byte[] serialize(Serializable obj) {
         try {
             ByteArrayOutputStream bout = new ByteArrayOutputStream();

Added: harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/VetoableChangeSupportTest.golden.ser
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/VetoableChangeSupportTest.golden.ser?view=auto&rev=536828
==============================================================================
Binary file - no diff available.

Propchange: harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/VetoableChangeSupportTest.golden.ser
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextChildSupportTest.golden.ser
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextChildSupportTest.golden.ser?view=auto&rev=536828
==============================================================================
Binary file - no diff available.

Propchange: harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextChildSupportTest.golden.ser
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextMembershipEventTest.golden.ser
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextMembershipEventTest.golden.ser?view=auto&rev=536828
==============================================================================
Binary file - no diff available.

Propchange: harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextMembershipEventTest.golden.ser
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceAvailableEventTest.golden.ser
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceAvailableEventTest.golden.ser?view=auto&rev=536828
==============================================================================
Binary file - no diff available.

Propchange: harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceAvailableEventTest.golden.ser
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceRevokedEventTest.golden.ser
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceRevokedEventTest.golden.ser?view=auto&rev=536828
==============================================================================
Binary file - no diff available.

Propchange: harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceRevokedEventTest.golden.ser
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServicesSupportTest.golden.ser
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServicesSupportTest.golden.ser?view=auto&rev=536828
==============================================================================
Binary file - no diff available.

Propchange: harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServicesSupportTest.golden.ser
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextSupportTest.golden.ser
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextSupportTest.golden.ser?view=auto&rev=536828
==============================================================================
Binary file - no diff available.

Propchange: harmony/enhanced/classlib/trunk/modules/beans/src/test/resources/serialization/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextSupportTest.golden.ser
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message