[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/aop ...
Ben Wang
bwang at jboss.com
Tue Feb 13 02:58:47 EST 2007
User: bwang
Date: 07/02/13 02:58:47
Modified: tests/functional/org/jboss/cache/aop Tag:
Branch_JBossCache_1_4_0 NewReplicatedAopTest.java
Log:
JBCACHE-977
Revision Changes Path
No revision
No revision
1.10.2.2 +25 -0 JBossCache/tests/functional/org/jboss/cache/aop/Attic/NewReplicatedAopTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: NewReplicatedAopTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/aop/Attic/NewReplicatedAopTest.java,v
retrieving revision 1.10.2.1
retrieving revision 1.10.2.2
diff -u -b -r1.10.2.1 -r1.10.2.2
--- NewReplicatedAopTest.java 3 Dec 2006 10:29:57 -0000 1.10.2.1
+++ NewReplicatedAopTest.java 13 Feb 2007 07:58:47 -0000 1.10.2.2
@@ -13,6 +13,7 @@
import org.jboss.cache.aop.test.Person;
import org.jboss.cache.aop.test.Student;
import org.jboss.cache.aop.test.CacheObject;
+import org.jboss.cache.aop.test.Address;
import javax.naming.Context;
import java.util.Properties;
@@ -98,6 +99,10 @@
Person test = new Person();
test.setName("Ben");
test.setAge(10);
+ Address addr = new Address();
+ addr.setCity("Taipei");
+ addr.setZip(106);
+ test.setAddress(addr);
cache_.putObject("/a", test);
Person result = (Person)cache_.getObject("/a");
assertEquals(" ", test, result);
@@ -114,6 +119,26 @@
assertEquals("Age should be ", 0, remote.getAge());
}
+ public void testSubClass() throws Exception
+ {
+ log_.info("testsubClass() ....");
+ Student test = new Student();
+ test.setName("Ben");
+ test.setAge(10);
+ Address addr = new Address();
+ addr.setCity("Taipei");
+ addr.setZip(106);
+ test.setAddress(addr);
+ cache_.putObject("/a", test);
+ Student result = (Student)cache_.getObject("/a");
+ assertEquals(" ", test, result);
+
+ Student remote = (Student)cache1_.getObject("/a");
+ System.out.println("Output on cache1: "+ result);
+ System.out.println("Output on cache2: "+ remote);
+ assertEquals("Age should be ", 10, remote.getAge());
+ }
+
public void testPutArray1() throws Exception
{
log_.info("testPutArray1() ....");
More information about the jboss-cvs-commits
mailing list