[jboss-cvs] JBossCache/tests-50/functional/org/jboss/cache/pojo ...
Ben Wang
bwang at jboss.com
Wed Aug 2 11:32:24 EDT 2006
User: bwang
Date: 06/08/02 11:32:24
Modified: tests-50/functional/org/jboss/cache/pojo
RecursiveRefTest.java
Log:
JBCACHE-694 Recurive toString
Revision Changes Path
1.3 +31 -0 JBossCache/tests-50/functional/org/jboss/cache/pojo/RecursiveRefTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: RecursiveRefTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests-50/functional/org/jboss/cache/pojo/RecursiveRefTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- RecursiveRefTest.java 27 Jun 2006 09:19:31 -0000 1.2
+++ RecursiveRefTest.java 2 Aug 2006 15:32:24 -0000 1.3
@@ -8,6 +8,8 @@
import java.util.HashMap;
import java.util.Map;
+import java.util.ArrayList;
+import java.util.HashSet;
public class RecursiveRefTest extends TestCase
{
@@ -61,6 +63,35 @@
} // catch
} // initCache
+ public void testRecursiveList() throws Exception
+ {
+ ArrayList list = new ArrayList();
+ list.add("1");
+ cache.attach("list", list);
+ list = (ArrayList)cache.find("list");
+ list.add(list);
+ System.out.println(list.toString());
+ }
+
+ public void testRecursiveSet() throws Exception
+ {
+ HashSet set = new HashSet();
+ set.add("1");
+ cache.attach("set", set);
+ set = (HashSet)cache.find("set");
+ set.add(set);
+ System.out.println(set.toString());
+ }
+
+ public void testRecursiveMap() throws Exception
+ {
+ HashMap map = new HashMap();
+ map.put("1", "1");
+ cache.attach("map", map);
+ map = (HashMap)cache.find("map");
+ map.put("2", map);
+ System.out.println(map.toString());
+ }
} // class TestRunner
More information about the jboss-cvs-commits
mailing list