[jboss-cvs] JBossCache/tests-50/functional/org/jboss/cache/pojo ...
Ben Wang
bwang at jboss.com
Sun Dec 3 05:30:30 EST 2006
User: bwang
Date: 06/12/03 05:30:30
Modified: tests-50/functional/org/jboss/cache/pojo
NewReplicatedTest.java
Log:
added test for array.
Revision Changes Path
1.7 +29 -0 JBossCache/tests-50/functional/org/jboss/cache/pojo/NewReplicatedTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: NewReplicatedTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests-50/functional/org/jboss/cache/pojo/NewReplicatedTest.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- NewReplicatedTest.java 31 Oct 2006 11:07:17 -0000 1.6
+++ NewReplicatedTest.java 3 Dec 2006 10:30:30 -0000 1.7
@@ -168,6 +168,35 @@
assertEquals("Name should be ", 95123, remote.getZip());
}
+ public void testPutArray1() throws Exception
+ {
+ log_.info("testPutArray1() ....");
+ long[] arr = new long[] {1, 2};
+ cache_.attach("array", arr);
+
+ long[] a2 = (long[])cache1_.find("array");
+ assertEquals("arr 0", 1, a2[0]);
+ }
+
+ public void testPutArray2() throws Exception
+ {
+ log_.info("testPutArray2() ....");
+ Person p1 = new Person();
+ p1.setName("Ben");
+ p1.setAge(10);
+
+ Person p2 = new Person();
+ p2.setName("Joe");
+ p2.setAge(20);
+ Person[] arr = new Person[] {p1, p2};
+
+ cache_.attach("array", arr);
+
+ Person[] a2 = (Person[])cache1_.find("array");
+ assertEquals("arr 0", "Ben", a2[0].getName());
+ }
+
+
/**
* JBCACHE-200.
*
More information about the jboss-cvs-commits
mailing list