You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by se...@apache.org on 2005/09/12 14:27:31 UTC

svn commit: r280326 - /db/torque/runtime/trunk/src/test/org/apache/torque/util/CriteriaTest.java

Author: seade
Date: Mon Sep 12 05:27:27 2005
New Revision: 280326

URL: http://svn.apache.org/viewcvs?rev=280326&view=rev
Log:
Added commented serialization test case.
It is commented out because it fails and is unlikely to be fixed in the upcoming release.

Modified:
    db/torque/runtime/trunk/src/test/org/apache/torque/util/CriteriaTest.java

Modified: db/torque/runtime/trunk/src/test/org/apache/torque/util/CriteriaTest.java
URL: http://svn.apache.org/viewcvs/db/torque/runtime/trunk/src/test/org/apache/torque/util/CriteriaTest.java?rev=280326&r1=280325&r2=280326&view=diff
==============================================================================
--- db/torque/runtime/trunk/src/test/org/apache/torque/util/CriteriaTest.java (original)
+++ db/torque/runtime/trunk/src/test/org/apache/torque/util/CriteriaTest.java Mon Sep 12 05:27:27 2005
@@ -483,6 +483,30 @@
         assertTrue(result.equals(firstExpect) || result.equals(secondExpect));
     }
 
+//    /**
+//     * Very basic test that serialization works.
+//     */
+//    public void testSerialization()
+//    {
+//        // Hashtable works:
+//        Hashtable h = new Hashtable();
+//        h.put("Author.NAME", "author");
+//        Hashtable hClone = (Hashtable) SerializationUtils.clone(h);
+//        assertEquals(h, hClone);
+//
+//        // Criterion works (even though Bloch strongly recommends against inner
+//        // classes implementing Serializable):
+//        Criterion cn = c.new Criterion("Author.NAME", "author");
+//        Criterion cnClone = (Criterion) SerializationUtils.clone(cn);
+//        assertEquals(cn, cnClone);
+//
+//        // Criteria DOES NOT WORK - i.e. it isn't actually Serializable at present.
+//        // http://mail-archives.apache.org/mod_mbox/db-torque-dev/200404.mbox/%3CF4DFE8EDB932F641A9407CFB5CA599C3F17DF1@e2kmtl1.internal.sungard.corp%3E
+//        c.add("Author.NAME", "author");
+//        Criteria cClone = (Criteria) SerializationUtils.clone(c);
+//        assertEquals(c, cClone);
+//    }
+
     /**
      * test for TRQS25
      */



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org