directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r423259 - /directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/message/LockableAttributesImplTest.java
Date Tue, 18 Jul 2006 21:20:47 GMT
Author: elecharny
Date: Tue Jul 18 14:20:46 2006
New Revision: 423259

URL: http://svn.apache.org/viewvc?rev=423259&view=rev
Log:
Added a commented serialization test

Modified:
    directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/message/LockableAttributesImplTest.java

Modified: directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/message/LockableAttributesImplTest.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/message/LockableAttributesImplTest.java?rev=423259&r1=423258&r2=423259&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/message/LockableAttributesImplTest.java
(original)
+++ directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/message/LockableAttributesImplTest.java
Tue Jul 18 14:20:46 2006
@@ -25,6 +25,12 @@
 import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
 import org.apache.directory.shared.ldap.util.ArrayUtils;
 
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+
 
 /**
  * Test cases for the methods of the LockableAttributeImpl class.
@@ -165,4 +171,23 @@
 
         assertTrue( "both implementations should produce the same outcome", attrs0.equals(
attrs1 ) );
     }
+    
+    /*public void testSerialization() throws IOException, ClassNotFoundException
+    {
+        LockableAttributesImpl attrs0 = new LockableAttributesImpl();
+        attrs0.put( "attr0", "value0" );
+        attrs0.put( "attr1", "value1" );
+        attrs0.put( "attr2", "value2" );
+        attrs0.put( "attr2", "value3" );
+
+        ByteArrayOutputStream buf1 = new ByteArrayOutputStream();
+        ObjectOutputStream oos1 = new ObjectOutputStream( buf1 );
+        oos1.writeObject( attrs0 );
+
+        ObjectInputStream ois1 = new ObjectInputStream(
+            new ByteArrayInputStream( buf1.toByteArray() ) );
+
+        LockableAttributesImpl attrs1 = (LockableAttributesImpl)ois1.readObject();
+        System.out.println( "Attributes: " + attrs1 );
+    }*/
 }



Mime
View raw message